- 02 Jun, 2014 1 commit
-
-
Mike Hibler authored
Since GUIDs are 16 bytes and our current interface MACs are only 12 bytes, I agonized over whether to grow the mac column to 16 bytes and just treat it as a unique identifier (which is all we use that column for anyway). However, in the end I just added a new guid column as there were mac columns in a variety of other tables and it wasn't clear what the relationship was and what I might break. So, the newnode MFS will now report back a GUID for interfaces it recognizes as IB (FreeBSD-specific right now). The boss-side checkin code with stash that value in new_interfaces (and later interfaces when added). For possible backward compat, it will also generate a MAC address from that (possibly Mellanox-specific) so that all entries in the interfaces table will have a MAC (yes, it should really be the other way around--all interfaces should always have a guid). End of story. We don't do anything else with IB right now other than stash an interface GUID.
-
- 26 May, 2014 1 commit
-
-
Mike Hibler authored
-
- 06 Nov, 2013 1 commit
-
-
Mike Hibler authored
-
- 24 Sep, 2012 1 commit
-
-
Eric Eide authored
This commit is intended to makes the license status of Emulab and ProtoGENI source files more clear. It replaces license symbols like "EMULAB-COPYRIGHT" and "GENIPUBLIC-COPYRIGHT" with {{{ }}}-delimited blocks that contain actual license statements. This change was driven by the fact that today, most people acquire and track Emulab and ProtoGENI sources via git. Before the Emulab source code was kept in git, the Flux Research Group at the University of Utah would roll distributions by making tar files. As part of that process, the Flux Group would replace the license symbols in the source files with actual license statements. When the Flux Group moved to git, people outside of the group started to see the source files with the "unexpanded" symbols. This meant that people acquired source files without actual license statements in them. All the relevant files had Utah *copyright* statements in them, but without the expanded *license* state...
-
- 20 Aug, 2009 1 commit
-
-
Ryan Jackson authored
FreeBSD network devices are named after the device driver used, whereas Linux network devices are named after the interface type, such as 'eth0' for the first ethernet interface. The newclient script would send each interface name to the server via the 'ifacenameX' parameter, and newnodecheckin.php would use it to get the driver type for the interface. This works with the FreeBSD MFS, but not with the Linux one. Without this fix, all reported interfaces would be of type 'eth', which isn't helpful. To fix this, a new parameter was added to newnodecheckin.php called 'ifacedriverX' (where X is the interface number). This parameter is optional for backward compatibility with existing newnode MFS images. If present, it is used to specify the interface type. If not, the ifacenameX parameter is munged as before to extract the interface type. The newclient script reports this parameter under both FreeBSD and Linux. On FreeBSD, the interface name is munged to extract the type. On Linux, the driver name is extracted from sysfs.
-
- 27 Feb, 2007 1 commit
-
-
Leigh B. Stoller authored
-
- 12 Feb, 2007 1 commit
-
-
Leigh B. Stoller authored
register_globals=1 to turn POST/GET/COOKIES arguments in local variables. This is known to be a terrible security risk, and we keep saying we are going to fix it, and now I am. In order to accomplish this on a transitional basis (since I don't want the entire web interface to stop working while I debug it), and because the code just needs the cleanup, I am doing it like this: Each page will sport new declarations at the top: RequiredPageArguments("experiment", PAGEARG_EXPERIMENT, "template", PAGEARG_TEMPLATE, "instance", PAGEARG_INSTANCE, "metadata", PAGEARG_METADATA, "osinfo", PAGEARG_OSINFO, "image", PAGEARG_IMAGE, "project", PAGEARG_PROJECT, "group", PAGEARG_GROUP, "user", PAGEARG_USER, "node", PAGEARG_NODE, "yesno", PAGEARG_BOOLEAN, "message", PAGEARG_STRING, "age", PAGEARG_INTEGER, "cost", PAGEARG_NUMERIC, "formfields", PAGEARG_ARRAY, "unknown", PAGEARG_ANYTHING); OptionalPageArguments("canceled", PAGEARG_BOOLEAN); The first token in each pair is the name of the global variable to set, and the second token is the type. So, for "experiment" we look at the URL for a pid/eid or exptidx, etc, sanity check them (safe for a DB query), and then try to find that experiment in the DB. If it maps to an experiment, set global variable $experiment to the object. Since its a required argument, produce an error if not supplied. Similar treatment for optional arguments, with the obvious difference. The goal is to have ALL argument processing in one place, consistent, and correct. I've found numerous places where we leak unchecked arguments into queries. It also cuts out a lot of duplicated code. * To make the above easier to deal with, I've been replacing lots of hardcoded URLS in the code of the form: foo.php3?pid=$pid&eid=$eid ... with CreateURL("foo", $experiment) which creates and returns the neccessary url string, by looking at the type of its arguments (experiment, template, instance, etc.) Eventually plan to replace them all so that URL handling throughout the code is all defined in one place (all the new URL code is in url_defs.php). * I have cranked up error reporting to tell me anytime a variable is used before it is initialized, plus a bunch of other stuff that PHP deems improper. Think of it like -Wall ... and boy we get a lot of warnings. A very large percentage of the diffs are to fix all these warnings. The warnings are currently going to /usr/testbed/log/php-errors.log, and I'll be adding a script to capture them each night and mail them to tbops. This file also gets errors (this will be a change for developers; rather then seeing errors and warnings dumped in the middle of web pages, they will go to this file instead). * Major refactoring of the code. More objects (nodes, images, osids). Moving tons of queries into the objects in the hopes of someday getting to a point where we can split the web interface onto a different server. Lots of general cleanup.
-
- 27 Apr, 2005 1 commit
-
-
Leigh B. Stoller authored
work inside ElabInElab. The crux of this is to emulate what switchmac does when incorporating nodes into the testbed. Rather then using snmpit to ask the switches for MAC info, we can just ask outer emulab via the proxy to get that same info from the DB. Note, there are no changes to the newnode MFS; it will boot and happily report it after launching teachswitch, but those packets are harmless to the situation. Another wrinkle is that we need the outer emulab to tell us which interfaces are control and which are experimental, since inside there is no real way to determine that. I did this by overloading the final field in the return from switchmac, and using that to override the "role" setting that utils/newnode would normally choose on its own. There is another new routine in the XMLRPC server that is intended to be used for bypassing the newnode path. This is not hooked into anything yet, but the intent is that rather then using the web interface to "add" nodes, we just return everything needed to seed the new_nodes and new_interfaces table, and then run newnodes directly.
-
- 08 Nov, 2004 1 commit
-
-
Robert Ricci authored
(as is the case for the ops node), create it automatically.
-
- 27 Aug, 2004 1 commit
-
-
Robert Ricci authored
This starts with a new option to newnode, -o, that tells it it's running on ops. This reports some slightly different information to the checkin page. The checkin page and the backend newnode script then take this extra information into account, and deal with ops nodes slightly differently.
-
- 24 Jun, 2004 1 commit
-
-
Robert Ricci authored
newclient to find it.
-
- 04 Jun, 2004 1 commit
-
-
Robert Ricci authored
passing this to the newnode client, web page, and viewing and editing it.
-
- 10 Sep, 2003 2 commits
-
-
Robert Ricci authored
-
Robert Ricci authored
naming scheme that ends in -A, where A is a letter, not a number.
-
- 21 Jul, 2003 1 commit
-
-
Robert Ricci authored
so that we can, say, ssh in to reboot it later.
-
- 17 Jul, 2003 1 commit
-
-
Robert Ricci authored
-
- 14 Jul, 2003 1 commit
-
-
Robert Ricci authored
one that lists and allows operations on a number of nodes at once, and another that allows editing of an individual node. Split much of the functionality of newnodecheckin.php into a new library, so it can get re-called from newnodes_list.php3 later. Move where we look for MACs on the switches - instead of doing in in newnode, call it from newnodecheckin.php - this provides the admins more feedback as to what's going on, and allows them to call it again later or put the information in by hand.
-
- 19 May, 2003 1 commit
-
-
Robert Ricci authored
newnodecheckin.php accepts some information about a new node, tries to figure out a node_id, IP, type, etc. for them, sticks this into the new_ tables, then alerts testbed-ops. Another (not yet created) page will be used to make the new node a real boy. newclient will run from a (not yet created) MFS - it collects various data about the node, like its MAC, runs teachswitch, and checks in via newnodecheckin.php .
-