1. 24 Jan, 2005 1 commit
    • Leigh Stoller's avatar
      Bottom line on this commit: Do not update the nodetypeXpid_permissions · 775ca147
      Leigh Stoller authored
      table by hand anymore! Update the group_policies table and then run
      the script to update the permissions table (sbin/update_permissions).
      
      Details:
      
      My original thought when I started this was that I would be able to
      replace the existing nodetypeXpid_permissions table with this new
      stuff. Well, it turns out that this was not a good thing to do, for a
      couple of reasons:
      
        * Engineering: We access the nodetypeXpid_permissions table from three
          different languages, and no way I wanted to rewrite this library in
          in python and php!
      
        * Performance: We access the nodetypeXpid_permissions from the web
          interface, on every single page load. In fact, we access it twice if
          if you count the FreePCs() count that we put at the top of the menu.
          Going through this library on each page load would be a serious drag.
      
      So, rather then actually get rid of the nodetypeXpid_permissions table, I
      decided to keep it as a "cache" of permissions stored in the group
      policies table. Each time you update the policy tables, we need to run
      the update_permissions script which will call into this library (see the
      TBUpdateNodeTypeXpidPermissions() routine) to reconstruct the permissions
      table. I have whacked the grantnodetype script to do exactly that.
      
      Note that we could proably do the same thing for users by creating an
      equivalent nodetypeXuid_permissions table, mapping users to types they
      are allowed to use. That would be a lot rows, but the amount of data in
      the table is small. That would give us very fine grained control of what
      we show people in the web interface. Not sure it is worth it though.
      
      I also added some instructions to previous commit in database-migrate.txt
      on populating the new group_policies table from the existing
      permissions table.
      775ca147
  2. 21 Jan, 2005 1 commit
    • Timothy Stack's avatar
      · aef98f9a
      Timothy Stack authored
      Add tbsetdest utility for generating random "setdest" events for the
      robots, it's just based on the original NS version.
      
      	* configure, configure.in: Add tbsetdest stuff to the list of
      	template files.  Fix from my last checkin, change error for
      	missing rsync to a warning.
      
      	* robots/GNUmakefile.in: Add tbsetdest subdir.
      
      	* robots/tbsetdest/GNUmakefile.in, robots/tbsetdest/tbsetdest.h,
      	robots/tbsetdest.cc: Original version of the NS "setdest"
      	utility.
      aef98f9a
  3. 18 Jan, 2005 1 commit
    • Leigh Stoller's avatar
      Here is a checkpoint of the admission control stuff I have been working on. · 54f55585
      Leigh Stoller authored
      The last part is the stuff to hook it in from assign_wrapper, and some
      additional support in assign that Rob is adding for me. This comment is
      from the top of new file db/libadminctrl.pm.in and describes everything in
      detail.
      
      # Admission control policies. These are the ones I could think of, although
      # not all of these are implemented.
      #
      #  * Number of experiments per type/class (only one expt using robots).
      #
      #  * Number of experiments per project
      #  * Number of experiments per subgroup
      #  * Number of experiments per user
      #
      #  * Number of nodes per project      (nodes really means pc testnodes)
      #  * Number of nodes per subgroup
      #  * Number of nodes per user
      #
      #  * Number of nodes of a class per project
      #  * Number of nodes of a class per group
      #  * Number of nodes of a class per user
      #
      #  * Number of nodes of a type per project
      #  * Number of nodes of a type per group
      #  * Number of nodes of a type per user
      #
      #  * Number of nodes with attribute(s) per project
      #  * Number of nodes with attribute(s) per group
      #  * Number of nodes with attribute(s) per user
      #
      # So we have group (pid/gid) policies and user policies. These are stored
      # into two different tables, group_policies and user_policies, indexed in
      # the obvious manner. Each row of the table defines a count (experiments,
      # nodes, etc) and a type of thing being counted (experiments, nodes, types,
      # classes, etc). When we test for admission, we look for each matching row
      # and test each condition. All conditions must pass. No conditions means a
      # pass. There is also some "auxdata" which holds extra information needed
      # for the policy (say, the type of node being restricted).
      #
      #      uid:     a uid
      #   policy:     'experiments', 'nodes', 'type', 'class', 'attribute'
      #    count:     a number
      #  auxdata:     a string (optional)
      #
      # Example: A user policy of ('mike', 'nodes', 10) says that poor mike is
      # not allowed to have more 10 nodes at a time, while ('mike', 'type',
      # '10', 'pc850') says that mike cannot allocate more than 10 pc850s.
      #
      # The group_policies table:
      #
      #      pid:     a pid
      #      gid:     a gid
      #   policy:     'experiments', 'nodes', 'type', 'class', 'attribute'
      #    count:     a number
      #  auxdata:     a string (optional)
      #
      # Example: A project policy of ('testbed', 'testbed', 'experiments', 10)
      # says that the testbed project may not have more then 10 experiments
      # swapped in at a time, while ('testbed', 'TG1', 'nodes', 10) says that the
      # TG1 subgroup of the testbed project may not use more than 10 nodes at
      # time.
      #
      # In addition to group and user policies (which are policies that apply to
      # specific users/projects/subgroups), we also need policies that apply to
      # all users/projects/subgroups (ie: do not want to specify a particular
      # restriction for every user!). To indicate such a policy, we use a special
      # tag in the tables (for the user or pid/gid):
      #
      #      '+'  -  The policy applies to all users (or project/groups).
      #
      # Example: ('+','experiments',10) says that no user may have more then 10
      # experiments swapped in at a time. The rule overrides anything more
      # specific (say a particular user is restricted to 20 experiments; the above
      # rule overrides that and the user (all users) is restricted to 10.
      #
      # Sometimes, you want one of these special rules to apply to everyone, but
      # *allow* it to be overridden by a more specific rule. For that we use:
      #
      #      '-'  -  The policy applies to all users (or project/groups),
      #              but can be overridden by a more specific rule.
      #
      # Example: The rules:
      #
      #	('-','type',0, 'garcia')
      #       ('testbed', 'testbed', 'type', 10, 'garcia')
      #
      # says that no one is allowed to allocate garcias, unless there is specific
      # rule that allows it; in this case the testbed project can allocate them.
      #
      # There are other global policies we would like to enforce. For example,
      # "only one experiment can be using the robot testbed." Encoding this kind
      # of policy is harder, and leads down a path that can get arbitrarily
      # complex. Tha path leads to ruination, and so we want to avoid it at
      # all costs.
      #
      # Instead we define a simple global policies table that applies to all
      # experiments currently active on the testbed:
      #
      #   policy:     'nodes', 'type', 'class', 'attribute'
      #     test:     'max', others I cannot think of right now ...
      #    count:     a number
      #  auxdata:     a string
      #
      # Example: A global policy of ('nodes', 'max', 10, '') say that the maximum
      # number of nodes that may be allocated across the testbed is 10. Thats not
      # a very realistic policy of course, but ('type', 'max', 1, 'garcia') says
      # that a max of one garcia can be allocated across the testbed, which
      # effectively means only one experiment will be able to use them at once.
      # This is of course very weak, but I want to step back and give it some
      # more thought before I redo this part.
      #
      # Is that clear? Hope so, cause it gets more complicated. Some admission
      # control tests can be done early in the swap phase, before we really do
      # anything (before assign_wrapper). Others (type and class) tests cannot
      # be done here; only assign can figure out how an experiment is going to map
      # to physical nodes (remember virtual types too), and in that case we need
      # to tell assign what the "constraints" are and let it figure out what is
      # possible.
      #
      # So, in addition to the simple checks we can do, we also generate an array
      # to return to assign_wrapper with the maximum counts of each node type and
      # class that is limited by the policies. assign_wrapper will dump those
      # values into the ptop file so that assign can enforce those maximum values
      # regardless of what hardware is actually available to use. As per discussion
      # with Rob, that will look like:
      #
      #	set-type-limit <type> <limit>
      #
      # and assign will spit out a new type of violation that assign_wrapper will
      # parse.
      #
      # NOTES:
      #
      #  1) Admission control is skipped in admin mode; returns okay.
      #  2) Admission control is skipped when the pid is emulab-ops; returns okay.
      #  3) When calculating current usage, nodes reserved to emulab-ops are
      #     ignored.
      #  4) The sitevar "swap/use_admission_control" controls the use of admission
      #     control; defaults to 1 (on).
      #  5) The current policies can be viewed in the web interface. See
      #     https://www.emulab.net/showpolicies.php3
      #  6) The global policy stuff is weak. I plan to step back and think about it
      #     some more before redoing it, but it will tide us over for now.
      #
      54f55585
  4. 17 Jan, 2005 1 commit
    • Timothy Stack's avatar
      · bf489797
      Timothy Stack authored
      More robot integration and some event system updates.
      
      	* configure, configure.in: Detect rsync for loghole and add
      	utils/loghole to the list of template files.
      
      	* db/libdb.pm.in, db/xmlconvert.in: Add virt_node_startloc to the
      	list of virtual tables.
      
      	* event/lib/event.h, event/lib/event.c, event/lib/tbevent.py.tail:
      	Add event_stop_main function to break out of the event_main()
      	loop.  Add timeline to the address tuple.
      
      	* event/sched/GNUmakefile.in, event/sched/error-record.h,
      	event/sched/error-record.c, event/sched/event-sched.8,
      	event/sched/event-sched.h, event/sched/event-sched.c,
      	event/sched/group-agent.h, event/sched/group-agent.c,
      	event/sched/listNode.h, event/sched/listNode.c,
      	event/sched/local-agent.h, event/sched/local-agent.c,
      	event/sched/node-agent.h, event/sched/node-agent.cc,
      	event/sched/queue.c, event/sched/rpc.h, event/sched/rpc.cc,
      	event/sched/simulator-agent.h, event/sched/simulator-agent.c,
      	event/sched/timeline-agent.h, event/sched/timeline-agent.c:
      	Updated event scheduler, not completely finished, but well enough
      	along for the robots.
      
      	* lib/libtb/GNUmakefile.in, lib/libtb/popenf.h,
      	lib/libtb/popenf.c, lib/libtb/systemf.h, lib/libtb/systemf.c: Add
      	some handy versions of system/popen that take format arguments.
      
      	* lib/libtb/tbdefs.h, lib/libtb/tbdefs.c: Add some more event and
      	object types.
      
      	* tbsetup/assign_wrapper.in: Add the virt_node_startloc building
      	to desires string for a node.
      
      	* tbsetup/ptopgen.in: Add a node's location to the feature list.
      
      	* tbsetup/tbreport.in: Display the timeline/sequence an event is a
      	part of.
      
      	* tbsetup/ns2ir/GNUmakefile.in: Add timeline, sequence, and
      	topography files.
      
      	* tbsetup/ns2ir/node.tcl: Add initial position for nodes and allow
      	them to be attached to "topographys".
      
      	* tbsetup/ns2ir/parse-ns.in: Make a hwtype_class array with a
      	node_type's class.  Make an 'areas' array that holds the
      	buildings where nodes are located.  Make an 'obstacles' table
      	with any obstacles in the building.
      
      	* tbsetup/ns2ir/parse.tcl.in: Move named-args function from
      	tb_compat.tcl to here.  Add reltime-to-secs function that converts
      	time given in a format like "10h2m1s" to a seconds value, used in
      	"$ns at" so its easier to write time values.  Add "K", "Kb", and
      	"Kbps" as possible units for bandwidth (only the lowercase
      	versions were available before).
      
      	* tbsetup/ns2ir/program.tcl: Add "dir" and "timeout" attributes,
      	although they don't go anywhere at the moment.
      
      	* tbsetup/ns2ir/sequence.tcl, tbsetup/ns2ir/timeline.tcl,
      	tbsetup/ns2ir/topography.tcl: Initial versions.
      
      	* tbsetup/ns2ir/sim.tcl.in: Add support for timelines and
      	sequences.  Add 'node-config' method to change the default
      	configuration for nodes produced by the Simulator object.  Send an
      	initial MODIFY event to any trafgen objects so their configuration
      	gets through, even when there are no start/stop events.  Move
      	event parsing to the 'make_event' method.
      
      	* utils/loghole.1, utils/loghole.in: Loghole utility, used for
      	retrieving logs from experimental nodes and creating archives of
      	the logs.
      
      	* xmlrpc/emulabclient.py.in: Escape any strange characters in the
      	output field.
      
      	* xmlrpc/emulabserver.py.in: Add virt_node_startloc to the list of
      	virtual_tables.  Add emulab.vision_config and
      	emulab.obstacle_config methods for getting information pertaining
      	to the robots.  Change the OSID listing to include more fields.
      	Add a "physical" aspect to experiment.info to get information
      	about the physical nodes.  Add parent field to the events in the
      	array returned by eventlist.  Add sshdescription to get extra
      	information needed to log into a vnode.  Add node.statewait so you
      	can wait for nodes to come up.
      bf489797
  5. 14 Jan, 2005 1 commit
    • Timothy Stack's avatar
      · dee46d59
      Timothy Stack authored
      Cross compilation fixes for the stargates, 'gmake client' should now
      build, link, and install properly.  Haven't really tried to run stuff though.
      
      	* GNUmakerules: Add target for stripping executables, used instead
      	of "install -s" since that doesn't work for cross-compiling.
      
      	* Makeconf.in: Add ELVIN_CONFIG variable that refers to
      	'elvin-config'.
      
      	* configure, configure.in: Detect and save the elvin-config path
      	since we need a different one for cross-compiling.
      
      	* event/lib/GNUmakefile.in, event/link-agent/GNUmakefile.in,
      	event/linktest/GNUmakefile.in, event/program-agent/GNUmakefile.in,
      	event/proxy/GNUmakefile.in, event/tbgen/GNUmakefile.in,
      	event/trafgen/GNUmakefile.in, os/dijkstra/GNUmakefile.in,
      	os/syncd/GNUmakefile.in, sensors/slothd/GNUmakefile.in,
      	tmcd/GNUmakefile.in, tmcd/linux/GNUmakefile.in: Cross compilation
      	fixes, don't statically link on arm, create "foo-debug"
      	executables with debugging info and install separately stripped
      	ones instead of passing "-s" to install.
      dee46d59
  6. 11 Jan, 2005 1 commit
    • Mike Hibler's avatar
      New firewall directory. Has the master file that describes the default · 16fd118f
      Mike Hibler authored
      rules (fw-rules), a script to populate the DB from those rules, and a
      script to initialize the firewall variables.
      
      This is not part of any standard make, it is used in a one-time fashion
      either at install or during the next update.  Still need to write the
      instructions for this.
      16fd118f
  7. 10 Jan, 2005 3 commits
    • Leigh Stoller's avatar
      A quick hack job to get the webcams onto the web interface. · d46902e1
      Leigh Stoller authored
      * Add new DB table "webcams" which hold the id of the webcam, the
        server it is attached to, and the last update time.
      
      * Add new sitevars webcam/anyone_can_view and webcam/admins_can_view.
        Should be obvious what they mean.
      
      * Add trivial script grabwebcams (invoked from cron) to grab the images
        from the servers and stash in /usr/testbed/webcams. The images are
        grabbed with scp, protected by a 5 second timeout. Fine for a couple
        of cameras.
      
      * Add web page stuff to display webcams, linked from the robot mape page.
      
      Permission to view the webcams is currently admin, or in a project that is
      allowed to use a robot. We can tighten this up later as needed.
      d46902e1
    • Mike Hibler's avatar
      aea704a4
    • Timothy Stack's avatar
      · 89bf0a7f
      Timothy Stack authored
      A bunch of engineering on the robot code.  I'm sure I've broken something,
      but the majority of it is done and I wanted to get a checkpoint in.
      
      	* GNUmakerules: Add rpcgen rules.
      
      	* Makeconf.in: Add PATH and host_cpu variables so
      	cross-compilation works properly.  Add JAVAC and JAR for java
      	compilation.  Add BRAINSTEM_DIR that refers to a brainstem build
      	directory to be used for the robot build.
      
      	* configure, configure.in: Prepend the arm cross-compile dir to
      	PATH.  Detect java for building applets.  Add --with-brainstem to
      	specify the brainstem build dir.  Add --enable-mezzanine to turn
      	on the mezzanine build.
      
      	* robots/GNUmakefile.in: Add client target that builds the
      	subdirs.
      
      	* robots/emc/GNUmakefile.in, robots/emc/emcd.h, robots/emc/emcd.c,
      	test_emcd.sh.in, robots/rmcd/GNUmakefile.in, robots/rmcd/rmcd.c,
      	robots/rmcd/test_rmcd.sh.in, robots/vmcd/test_vmc-client.sh.in,
      	robots/vmcd/test_vmcd.sh.in, robots/vmcd/test_vmcd2.sh,
      	robots/vmcd/test_vmcd3.sh, robots/vmcd/test_vmcd4.sh,
      	robots/vmcd/vmc-client.c, robots/vmcd/vmcd.c: Updates for the mtp
      	switch to using rpcgen.
      
      	* robots/emc/test_emcd.config: Restore missing config line.
      
      	* robots/mtp/GNUmakefile.in, robots/mtp/global_bound.java,
      	robots/mtp/mtp.h, robots/mtp/mtp.c, robots/mtp/mtp.java,
      	robots/mtp/mtp.x, robots/mtp/mtp_command_goto.java,
      	robots/mtp/mtp_command_stop.java, robots/mtp/mtp_config_rmc.java,
      	robots/mtp/mtp_config_vmc.java, robots/mtp/mtp_control.java,
      	robots/mtp/mtp_dump.c, robots/mtp/mtp_garcia_telemetry.java,
      	robots/mtp/mtp_opcode_t.java, robots/mtp/mtp_packet.java,
      	robots/mtp/mtp_payload.java, robots/mtp/mtp_recv.c,
      	robots/mtp/mtp_request_id.java,
      	robots/mtp/mtp_request_position.java,
      	robots/mtp/mtp_robot_type_t.java, robots/mtp/mtp_role_t.java,
      	robots/mtp/mtp_send.c, robots/mtp/mtp_status_t.java,
      	robots/mtp/mtp_telemetry.java, robots/mtp/mtp_update_id.java,
      	robots/mtp/mtp_update_position.java, robots/mtp/robot_config.java,
      	robots/mtp/robot_position.java, robots/mtp/test_mtp.sh: Replace
      	hand-generated stubs with xdr stubs for C and java.  Java stubs
      	were generated by "remotetea's" jrpcgen.
      
      	* robots/primotion/GNUmakefile.in,
      	robots/primotion/buttonManager.hh,
      	robots/primotion/buttonManager.cc, robots/primotion/dashboard.hh,
      	robots/primotion/dashboard.cc, robots/primotion/flash-user-led.cc,
      	robots/primotion/garcia-pilot.cc, robots/primotion/garciaUtil.hh,
      	robots/primotion/garciaUtil.cc, robots/primotion/ledManager.hh,
      	robots/primotion/ledManager.cc,
      	robots/primotion/pilotButtonCallback.hh,
      	robots/primotion/pilotButtonCallback.cc,
      	robots/primotion/pilotClient.hh, robots/primotion/pilotClient.cc,
      	robots/primotion/watch-user-button.cc,
      	robots/primotion/wheelManager.hh,
      	robots/primotion/wheelManager.cc: Replace gorobot with
      	garcia-pilot, a beefed up daemon for controlling the robots.
      	Improvements include: making use of the user LED and button to
      	give some feedback and let the wrangler run a test sequence,
      	reboot, and shutdown the robot; Logging of the battery level, how
      	often the robot has moved and for how long, and the distance
      	traveled; telemetry is sent back to emulab clients; movements are
      	now just pivot-move instead of pivot-move-pivot, since the second
      	pivot ends up being extra work most of the time; the robot will
      	move backwards to cut down on the amount of rotation; and just
      	generic cleanups to the code.
      
      	* robots/primotion/garcia.config: The configuration file currently
      	used on the garcias.
      
      	* www/GNUmakefile.in: Add garcia-telemetry subdir to the build.
      
      	* www/dbdefs.php3.in: Add TBNodeClass and TBNodeStatus functions.
      
      	* www/garcia-telemetry/Base64.java,
      	www/garcia-telemetry/GNUmakefile.in,
      	www/garcia-telemetry/GarciaTelemetry.java,
      	www/garcia-telemetry/UpdateThread.java,
      	www/garcia-telemetry/main.xml: A telemetry applet for the garcia,
      	it displays readouts for the various sensors and other bits of data
      	gathered by the garcia-pilot daemon.  Hopefully, it will make a
      	handy debugging tool.
      
      	* www/garcia-telemetry.jar, www/mtp.jar, www/oncrpc.jar,
      	www/thinlet.jar: Java jars used by the robot telemetry applet.
      
      	* www/servicepipe.php3: A slightly enhanced version of
      	ledpipe.php3 that can be used for other services, like robot
      	telemetry.
      
      	* www/shownode.php3: Add "Show Telemetry" menu item to robot
      	nodes.
      
      	* www/telemetry.php3: Telemetry page for the garcia-telemetry
      	applet.
      89bf0a7f
  8. 07 Jan, 2005 2 commits
    • Mike Hibler's avatar
      We don't have enough config time variables yet, so I added: · 2f6a197d
      Mike Hibler authored
      	FSNODE_IP
      	EXTERNAL_FSNODE_IP
      
      which default to ops' IP address if not set.  This allows for separate
      ops/fs nodes, a config Aero has.
      
      Also push some IP addresses (boss, ops, fs) into config.h so they can
      be used in C programs.  Specifically tmcd for returning values of
      "firewall variables" that can be used in default firewall rules.
      But I will likely wind up putting the var/value pairs in the DB rather
      than compiling them into tmcd.
      2f6a197d
    • Leigh Stoller's avatar
      Named setup gets a serious collagen injection ... As per Mike/Rob · cff2421e
      Leigh Stoller authored
      request, beef up named setup so that sites like DETER are handled
      properly. I have added 4 new defs variables:
      
          #
          # If your boss/ops nodes are multihomed (and typically, one of the
          # networks is a public routable network, and the other is an internal
          # unroutable network), then define the the external addresses here (and
          # the internal addresses above).
          #
          EXTERNAL_BOSSNODE_IP=$BOSSNODE_IP
          EXTERNAL_USERNODE_IP=$USERNODE_IP
      
          #
          # As above, if you have internal and external networks, define the
          # external network here, and the internal network above.
          #
          EXTERNAL_TESTBED_NETWORK=$TESTBED_NETWORK
          EXTERNAL_TESTBED_NETMASK=$TESTBED_NETMASK
      
      which if not set default to the internal values. When the external and
      internal networks are different, generate two sets of reverse zone
      files and two forward files (one internal and one external).
      cff2421e
  9. 03 Jan, 2005 1 commit
  10. 21 Dec, 2004 2 commits
    • Timothy Stack's avatar
      · 241132a3
      Timothy Stack authored
      Some cleanup of the robot vision system:
      
      	* Makeconf.in: Add INSTALL_INCDIR for includes, EVENTSYS for
      	whether or not the event system is available, HAVE_MEZZANINE for
      	whether or not we'll be building mezzanine, and GTK_CONFIG which
      	refers to the gtk-config binary, if there is one.
      
      	* config.h.in: Add HAVE_LINUX_VIDEODEV_H and HAVE_MEZZANINE
      	defines.
      
      	* configure, configure.in: Check for the robot vision system
      	dependencies.  Add mezzanine template files.
      
      	* robots/GNUmakefile.in: Add some conditionals for directories
      	that depend on the event-system and mezzanine.
      
      	* robots/mezzanine/GNUmakefile.in,
      	robots/mezzanine/libfg/GNUmakefile.in,
      	robots/mezzanine/libmezz/GNUmakefile.in,
      	robots/mezzanine/mezzanine/GNUmakefile.in,
      	robots/mezzanine/mezzcal/GNUmakefile.in,
      	robots/mezzanine/rtk2/GNUmakefile.in: Fold mezzanine into the
      	testbed's build system.
      
      	* robots/vmcd/GNUmakefile.in: When building the vmc-client, use
      	the mezzanine that we build locally instead of an installed
      	version.
      
      	* robots/vmcd/test_vmc-client.sh.in, robots/vmcd/test_vmcd.sh.in,
      	robots/vmcd/test_vmcd2.sh, robots/vmcd/test_vmcd3.sh,
      	robots/vmcd/test_vmcd4.sh: Bring the test cases up-to-date with
      	respect to the actual code.
      
      	* robots/vmcd/vmc-client.c: A bunch of cleanups and bug fixes: add
      	comments, set TCP_NODELAY on the client sockets (doh), etc...
      241132a3
    • Leigh Stoller's avatar
      Add configuration of named forwarders driven from NAMED_FORWARDERS · 2a1b6543
      Leigh Stoller authored
      variable in the defs file. Nice for elabinelab to avoid inner named
      from having to do too much work.
      2a1b6543
  11. 20 Dec, 2004 1 commit
  12. 16 Dec, 2004 2 commits
    • Robert Ricci's avatar
      Add support (admins only for now) for restarting the event system via · 1d13cde6
      Robert Ricci authored
      the web interface.
      1d13cde6
    • Leigh Stoller's avatar
      The panic button ... · 87dd2e60
      Leigh Stoller authored
      * tbsetup/panic.in: New backend script to implement the panic button
        feature. When used, it will cut the severe the connection to the
        firewall node by using snmpit to disable the port. Sets the panic
        bit (and date) in the experiments table, and changes the state of
        the experiment from "active" to "paniced" to ensure that the
        experiment cannot be messed with (swapped out or modified). Sends
        email to tbops when the panic button is pressed.
      
        Used with -r option, reverses the above. State is set back to
        active, the panic bit is cleared, and the port is renabled with
        snmpit.
      
      * tbsetup/tbswap.in: During swapout, a firewalled experiment that has
        been paniced will get a cleaning; The nodes are powered off, then
        the osids for all the nodes are reset (with os_select) so that they
        will boot the MFS, and then the nodes are powered on. Then the
        control network is turned back on, and then I wait for the nodes to
        reboot (this is simply cause we do not record in the DB that a node
        is turned off, and if I do not wait, the reload daemon will end
        hitting the power button again if they do not reboot in time. We can
        fix this later.
      
        I am not planning to apply this to general firewalled experiments
        yet as the power cycling is going to be hard on the nodes, so would
        rather that we at least have a 1/2 baked plan before we do that.
      
      * www/showexp.php3: If experiment is firewalled, show the Panic
        Button, linked to the panic button web script. If the experiment has
        already had the panic button pressed, show a big warning message and
        explain that user must talk to tbops to swap the experiment out.
        Also fiddle with menu options so that the terminate link is gone,
        and the swap link is visible only in admin mode. In other words, only
        an admin person can swap an experiment once it is paniced. And of
        course, an admin person can the backend panic script above with the
        -r option, but thats not something to be done lightly.
      
      * db/libdb.pm.in: Add "paniced" as an experiment state (EXPTSTATE_PANICED).
        Add utility functions: TBExptSetPanicBit(), TBExptGetPanicBit(), and
        TBExptClearPanicBit().
      
      * tbsetup/swapexp.in: Minor state fiddling so that an experiment can
        be swapped while in paniced state, but only when in admin mode. Also
        clear the panic bit when experiment is swapped out.
      
      * www/dbdefs.php3.in: Add "paniced" as an experiment state. Add a
        utility function TBExptFirewall() to see if experiment is firewalled.
      
      * www/panicbutton.php3: New web script to invoke the backend panic
        script mentioned above, after the usual confirm song and dance.
      
      * www/panicbutton.gif: New gif of a red panic button that I stole off
        the net. If anyone has sees/has a better one, feel free to replace
        this one.
      
      * utils/node_statewait.in: Add -s option so that I can pass in the
        state I want to wait for (used from tbswap above to wait for nodes
        to reach ISUP after power on).
      87dd2e60
  13. 15 Dec, 2004 1 commit
  14. 14 Dec, 2004 1 commit
  15. 13 Dec, 2004 2 commits
    • Robert Ricci's avatar
      New script: tbsgmotepower - · b63374eb
      Robert Ricci authored
      	A script for powering on, off, and cycling motes attached to
      	stargates
      
      Requires /usr/local/bin/motepower (our program, not yet in CVS) to be
      installed on the hosting stargate.
      b63374eb
    • Timothy Stack's avatar
      · fde7ae29
      Timothy Stack authored
      Rmcd and garcia stuff:
      
      	* configure, configure.in: Add robot related template files.
      
      	* robots/GNUmakefile.in: Add primotion directory.
      
      	* robots/emc/emcd.c: Debugging printfs, check the status for
      	update-position messages from rmc, and add a basic handler for
      	emulab clients.
      
      	* robots/emc/test_emcd.sh.in: Update for changes in mtp.
      
      	* robots/mtp/mtp.h, robots/mtp/mtp.c: Changes for the garcia.
      
      	* robots/mtp/mtp_send.c: Fixes so that it will compile under
      	linux.
      
      	* robots/primotion/GNUmakefile.in: Makefile for building a fake
      	gorobot in the testbed tree.
      
      	* robots/primotion/Makefile: tweaks
      
      	* robots/primotion/gorobot.cc: First draft with sort-of working
      	networking code.
      
      	* robots/primotion/test_gorobot.sh.in: Test case for the fake
      	gorobot.
      
      	* robots/primotion/dgrobot/GNUmakefile.in: Makefile for building a
      	fake grobot class in the testbed tree.
      
      	* robots/primotion/dgrobot/grobot.h: Add #if !defined(GROBOT_SIM)
      	conditionals.
      
      	* robots/primotion/dgrobot/grobot_sim.cc: Empty impl of grobot
      	class used for testing.
      
      	* robots/rmcd/GNUmakefile.in: Targets for building rmcd and
      	running its test case.
      
      	* robots/rmcd/rmcd.c: First draft with sort-of working networking
      	code.
      
      	* robots/rmcd/test_emcd.config: emcd configuration for the rmcd
      	test case.
      
      	* robots/rmcd/test_rmcd.sh.in: Test case for rmcd.
      fde7ae29
  16. 10 Dec, 2004 1 commit
    • Timothy Stack's avatar
      · d286c0cb
      Timothy Stack authored
      Start on vmc:
      
      	* configure, configure.in: Add vmcd related template files.
      
      	* robots/GNUmakefile.in: Switch order of vmcd/rmcd.
      
      	* robots/emc/GNUmakefile.in: cleanup
      
      	* robots/mtp/GNUmakefile.in: Add mtp_dump tool.
      
      	* robots/mtp/mtp.c: Change mtp_encode_packet to use a passed in
      	buffer pointer or allocate a buffer if its NULL, probably gonna be
      	a big source of errors...
      
      	* robots/mtp/mtp_dump.c: Another command-line tool that connects
      	to a server and dumps mtp packets that are received.  Useful for
      	seeing output from the vmc-client.
      
      	* robots/vmcd/GNUmakefile.in: Add vmc-client and test case.
      
      	* robots/vmcd/test_vmc-client.sh.in: Test case for the vmc-client.
      
      	* robots/vmcd/vmc-client.c: First cut of the vmc-client, it reads
      	mezzanine output and sends it to any connected clients.
      d286c0cb
  17. 09 Dec, 2004 1 commit
    • Timothy Stack's avatar
      · 1f16a276
      Timothy Stack authored
      Make the dots move on the robot map web page:
      
      	* configure, configure.in: Add robots/emc/loclistener.
      
      	* event/lib/event.h, event/lib/event.c: Add some helper functions
      	for sending events and parsing args.
      
      	* event/lib/tbevent.py.tail, event/lib/tbevent.py: Add support for
      	clients that register using keyfiles.
      
      	* robots/emc/GNUmakefile.in: Install loclistener on boss.
      
      	* robots/emc/emcd.h, robots/emc/emcd.c: Send update events every
      	two seconds with the node's location.  Fill out a little more of
      	the event callback, not sure what to do with the requested
      	destination though.  Add some code to the vmc callback to store
      	position updates.  Changed the config file format to also include
      	the vname of the robot.
      
      	* robots/emc/loclistener.in: Listen for NODE MODIFY events with
      	coordinates and update the database accordingly.  Kinda sucks, but
      	it works.
      
      	* robots/emc/test_emcd.config: Add vnames to the robots to reflect
      	change in the config file format.
      
      	* tbsetup/ns2ir/node.tcl: Add nodes to the virt_agents table.
      1f16a276
  18. 08 Dec, 2004 1 commit
    • Timothy Stack's avatar
      · feea9720
      Timothy Stack authored
      Elvinize emc and some bug fixes...
      
      	* configure, configure.in: Add "robots/emc/test_emcd.sh" script to
      	the list of template files.
      
      	* robots/GNUmakefile.in: Add a target for install-subdir.
      
      	* robots/emc/GNUmakefile.in: Compile emcd and install it on ops.
      	Add test_emcd.sh test case.
      
      	* robots/emc/emcd.h, robots/emc/emcd.c: Elvinize, add support for
      	events, and some minor cleanup.
      
      	* robots/emc/robot_list.c: Compilation fixes.
      
      	* robots/emc/test_emcd.config: Robot config for the test case.
      
      	* robots/emc/test_emcd.sh.in: Test case for emcd, just starts it
      	up and uses mtp_send to send a few messages to it.
      
      	* robots/mtp/GNUmakefile.in: Install mtp_send and mtp_recv on ops.
      
      	* robots/mtp/mtp.h, robots/mtp/mtp.c: Marshall floats correctly,
      	doh!  Move the packet printing code from mtp_recv to the lib.
      
      	* robots/mtp/mtp_recv.c: Move the packet printing code to the
      	lib.
      
      	* robots/mtp/mtp_send.c: Add a "-w" option to wait for a response
      	from the peer and then dump the packet to stdout.  Allow multiple
      	packets to be sent from a single invocation, the arguments for
      	each packet must be separated by a double dash (--), see
      	test_emcd.sh.in for an example.
      
      	* robots/mtp/mtp_test.c: Gah, test with actual floating point
      	values dummy.
      feea9720
  19. 07 Dec, 2004 1 commit
    • Timothy Stack's avatar
      · 0ed6b518
      Timothy Stack authored
      Command line tools for the robot protocol:
      
      	* configure, configure.in: Add the robots GNUmakefiles.
      
      	* robots/mtp/GNUmakefile.in: Add command line tools: mtp_send and
      	mtp_recv.
      
      	* robots/mtp/mtp.c: Make readall return an error if all of the
      	data wasn't read instead of making the caller check.  Free the
      	buffer allocated in mtp_send_packet.  Add an mtp_free_packet.
      
      	* robots/mtp/mtp_recv.c: Faux receiver of mtp packets, it doesn't
      	actually follow the protocol, it just prints out whatever it
      	receives.
      
      	* robots/mtp/mtp_send.c: Command line tool for sending mtp
      	packets.
      0ed6b518
  20. 16 Nov, 2004 1 commit
    • Leigh Stoller's avatar
      ElabInElab Addition: New script that uses the frisbee client to · 6777d279
      Leigh Stoller authored
      download images from the outer emulab. This script is invoked from
      frisbeelauncher when ELABINELAB=1 and the filename does not exist
      (thus attempting to get the image file before bailing). The
      frisbeeimage script uses a new method in the RPC server to fire up a
      frisbeed (using frisbeelauncher on the outer Emulab), subject to the
      usual permission checks against creator of the elabinelab experiment
      (I assume that the creator will have access to any outer images that
      are used inside the inner emulab). If outer frisbeelauncher succeeds,
      its return value is the load_address (IP:port), which is used to fire
      up a frisbee client to get the image file and write it out (using
      Mike's new -N option that just dumps the raw data to file). Once the
      image is downloaded, control returns to inner frisbeelauncher and
      proceeds as normal.
      
      I whacked this together pretty quickly. Under heavy usage it might hit
      a race condition or two, but I do not expect that to happen in an
      inner elab for a while.
      6777d279
  21. 15 Nov, 2004 3 commits
  22. 12 Nov, 2004 1 commit
  23. 08 Nov, 2004 2 commits
    • Timothy Stack's avatar
      Just use '.' to source the defs file. · 037b78af
      Timothy Stack authored
      037b78af
    • Leigh Stoller's avatar
      Remove the SSLCERT defs and the network defs from configure proper. · b5b25b5d
      Leigh Stoller authored
      Move them to defs-default.
      
      Allow for per-user defs files to use . defs-default in them. I do this
      by temporarly changing the path when evaluating the defs file, adding
      the directory where the defs file lives. So, you can do this in your
      personal defs file, whic saves on a lot of typing!
      
      	. defs-default
      	TBOPSEMAIL=stoller@flux.utah.edu
      	TBLOGSEMAIL=stoller@flux.utah.edu
      	blah
      	blah
      	blah
      
      I also changed all of the *local* defs file to use the above format.
      b5b25b5d
  24. 07 Nov, 2004 1 commit
  25. 01 Nov, 2004 1 commit
  26. 29 Oct, 2004 3 commits
  27. 26 Oct, 2004 1 commit
  28. 25 Oct, 2004 1 commit
  29. 08 Oct, 2004 1 commit