1. 09 Feb, 2005 1 commit
    • Timothy Stack's avatar
      · ea206d40
      Timothy Stack authored
      Robot-related improvements based on feedback from Sid:
      
      	* event/sched/event-sched.h, event/sched/event-sched.c,
      	event/sched/rpc.h, event/sched/rpc.cc: Send a notification of the
      	start of event time and timelines.  Add a '-r' option that forces
      	it to use the default rpc path (so dan can use a custom
      	scheduler/rmcd/etc on ops).
      
      	* robots/GNUmakefile.in, robots/emc/GNUmakefile.in,
      	robots/mtp/GNUmakefile.in, robots/primotion/GNUmakefile.in,
      	robots/rmcd/GNUmakefile.in, robots/vmcd/GNUmakefile.in,
      	robots/tbsetdest/tbsetdest.cc: Add a control-install target.
      
      	* robots/primotion/garcia-pilot.cc: Take out some experimental
      	code.
      
      	* robots/primotion/dashboard.hh, robots/primotion/dashboard.cc,
      	robots/primotion/pilotClient.cc, robots/primotion/wheelManager.hh,
      	robots/primotion/wheelManager.cc: When doing a COMMAND_STOP, make
      	sure we only send one update packet, an idle or an abort.  Also
      	send back the actual distance travelled/pivoted.
      
      	* robots/tbsetdest/tbsetdest.cc: Don't output setdest event's with
      	a speed of zero.
      
      	* tbsetup/eventsys_control.in: When replaying/stopping, clear the
      	start of event time for the experiment.
      
      	* tbsetup/power_mail.pm.in: Decrease the threshold used to tell if
      	a node has been power cycled "recently".
      
      	* tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/sim.tcl.in: Bah, backout
      	last change, orientation is supposed to be in degrees at these
      	points.  Also, when automatically picking the sync server, don't
      	use nodes that are subnodes.
      
      	* tmcd/common/bootsubnodes: Send an ISUP for motes.
      
      	* www/moteleds.php3: Show the mote node names instead of the
      	robots.
      
      	* www/powertime.php3: Add option to mark nodes as powered off.
      
      	* www/robotmap.php3: Display the elapsed time for the overall
      	event time and for each active timeline.
      
      	* www/showexp.php3: Only display the blinky lights menu item when
      	there are motes.
      
      	* www/shownode.php3: Change "Update Power Time" -> "Update Power
      	State".
      
      	* www/tutorial/mobilewireless.php3: Fix some nits.
      
      	* xmlrpc/emulabserver.py.in: Add event_time_start method for
      	storing/getting/clearing the start of event time for an
      	experiment/timeline.
      ea206d40
  2. 04 Feb, 2005 1 commit
    • Timothy Stack's avatar
      · 6f545cf0
      Timothy Stack authored
      Some more robot integration.
      
      	* event/lib/event.h, event/lib/event.c: Add some
      	event_notification creation functions that get used in
      	event-sched.
      
      	* event/sched/event-sched.c, event/sched/rpc.h,
      	event/sched/rpc.cc: Sync the start of event time with the
      	robots reaching their initial positions.  This is done by
      	creating a master event-sequence that takes care of sending
      	the SETDEST events and then starting the Simulator timeline.
      
      	* mote/tbuisp.in: Use node_reboot instead of ssh'ing in.
      
      	* robots/GNUmakefile.in: Don't build tbsetdest if ulsshxmlrpcpp is
      	not available.
      
      	* robots/emc/loclistener.in: Clear the destination values for a
      	node when it reaches its destination.
      
      	* robots/primotion/garcia-pilot.cc,
      	robots/primotion/pilotClient.cc: Some cleanup and debugging.
      
      	* robots/primotion/wheelManager.cc: Check the rear sensors for
      	obstructions and then decide which way to pivot.
      
      	* robots/rmcd/pilotConnection.h, robots/rmcd/pilotConnection.c,
      	robots/rmcd/rclip.h: Even more tweaking.
      
      	* robots/tbsetdest/tbsetdest.cc: Don't generate points that are
      	outside the camera bounds or inside an obstacle.
      
      	* robots/vmcd/visionTrack.c, robots/vmcd/vmcd.h,
      	robots/vmcd/vmcd.c:  Add more debugging output.
      
      	* tbsetup/os_setup.in: Removed the robot hack used when deciding
      	which nodes to reconfig/reboot.  Added a robot hack to avoid
      	rebooting a robot whose mote is being os_load'd, since it would
      	interrupt tbuisp which does the reboot anyways.  Also fixed a
      	small typo.
      
      	* tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/sim.tcl.in: Oops, forgot
      	to convert degrees to radians.
      
      	* tbsetup/ns2ir/topography.tcl: When checking for node destination
      	points in obstacles, include the implicit exclusion zone.
      
      	* tmcd/common/bootsubnodes: Add empty "mote" case.
      
      	* tmcd/linux-sg/GNUmakefile.in: Make some of the /etc subdirs when
      	doing the install.
      
      	* tmcd/linux-sg/rc.stargate: Start garcia-pilot.
      
      	* vis/floormap.in: Add options for showing the camera bounds,
      	obstacle exclusion zones, and displaying vnames instead of pnames.
      
      	* www/ledpipe.php3: Finally figured out how to use a socket
      	instead of popening a perl script.
      
      	* www/robotmap.php3: Add checkboxes for displaying/not displaying
      	the camera bounds and obstacle exclusion zones.  Add a legend
      	showing what actual vs. destination points are.  Pass pid/eid
      	through to vis/floormap if it is given.
      
      	* www/showexp.php3: Add a "Robot Map" link to experiments that
      	have allocated garcias.
      
      	* www/floormap/map_legend_node.gif,
      	www/floormap/map_legend_node_dst.gif: Icons used by the robot map
      	legend.
      
      	* www/floormap/robots-4.jpg: Added an obstacle around the entryway
      	so people are slightly less likely to trip over the robots.  Added
      	a coordinate system legend to the top left corner.
      
      	* www/tutorial/mobilewireless.php3: Add links to David's movie of
      	the robot making its way around the pillar.
      
      	* www/tutorial/robot_anim.gif: A nifty gifanim clip of the robot
      	movie.
      
      	* xmlrpc/emulabserver.py.in: Pull the camera data from the DB,
      	instead of returning hardcoded stuff.
      6f545cf0
  3. 24 Jan, 2005 1 commit
    • Timothy Stack's avatar
      · 3c1a5bad
      Timothy Stack authored
      Robot related stuff: power via e-mail, client-install fixups, checking
      coords against camera boundaries.
      
      	* configure, configure.in: Add tbsetup/power_mail.pm to the list
      	of template files.
      
      	* doc/cross-compiling.txt: More stargate notes.
      
      	* event/sched/rpc.cc: Updates for the addition of the cameras
      	table.
      
      	* robots/GNUmakefile.in, robots/emc/GNUmakefile.in,
      	robots/mtp/GNUmakefile.in, robots/rmcd/GNUmakefile.in,
      	robots/tbsetdest/GNUmakefile.in, robots/vmcd/GNUmakefile.in:
      	client-install fixups.
      
      	* tbsetup/GNUmakefile.in: Add power_mail.pm.
      
      	* tbsetup/os_setup.in: Don't skip reboot of robots anymore.
      
      	* tbsetup/power.in: Add special case for a power_id of "mail",
      	which calls into the power_mail.pm backend.
      
      	* tbsetup/power_mail.pm.in: E-mail backend for power, it sends an
      	e-mail to tbops and waits for the outlets.last_power value to be
      	updated from the power.php3 web page.
      
      	* tbsetup/ns2ir/parse-ns.in: Add the contents of the cameras table
      	to the TBCOMPAT namespace.
      
      	* tbsetup/ns2ir/sim.tcl.in: More checking of "setdest" inputs.
      
      	* tbsetup/ns2ir/topography.tcl: Update the checkdest method to
      	check destination points against the camera list.
      
      	* www/powertime.php3: Webpage used to update the last power time
      	for nodes.
      
      	* www/shownode.php3: Add "Update Power Time" menu button.
      3c1a5bad
  4. 22 Jan, 2005 1 commit
  5. 17 Jan, 2005 2 commits
    • Timothy Stack's avatar
      · 1e18722e
      Timothy Stack authored
      More robot tweaks:
      
      	* event/sched/event-sched.c: Start rmcd, then vmcd.
      
      	* event/sched/rpc.cc: Add camera dimensions to the config file.
      
      	* robots/emc/emcd.c: Add camera dimensions to the config file and
      	destroy vmc's position_list when it disconnects.
      
      	* robots/mtp/mtp.x, robots/mtp/mtp.c: Add dimensions to the camera
      	config and add a command_id field to the update_position packet.
      
      	* robots/primotion/garcia-pilot.cc: Move the decl of the acpGarcia
      	object below daemon(3) since it doesn't seem to like it when the
      	parent process dies and fix the log file creation.
      
      	* robots/primotion/pilotClient.cc: Pass the command_id back in any
      	update_position packets.
      
      	* robots/rmcd/rmcd.c: Use the command-id to distinguish between
      	STOPs for the sake of a GOTO and a wiggle.
      
      	* robots/vmcd/visionTrack.h, robots/vmcd/visionTrack.c: Only
      	coalesce packets from different cameras (duh) and mess with the
      	tolerances a little more.
      
      	* xmlrpc/emulabserver.py.in: Add some rough camera dimensions.
      1e18722e
    • 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
  6. 07 Nov, 2004 1 commit
    • Timothy Stack's avatar
      · f95e336d
      Timothy Stack authored
      Change to the SSL version of the event scheduler.
      
        * db/libdb.py.in, xmlrpc/emulabserver.py.in: Only add the testbed
          library path to sys.path if it is not already there.
      
        * event/sched/GNUmakefile.in: Make the SSL version of the scheduler
          the default instead of the SSH version and statically link the
          executable.
      
        * event/sched/event-sched.c: Pass the default SSL port number (3069)
          to RPC_init.
      
        * event/sched/rpc.cc: Bring the SSL code up to date: read the cert
          from the user's home directory, make the connection persistent,
          and use TBROOT as the request path, so the development version of
          the XML-RPC library is used when appropriate.
      
        * xmlrpc/sslxmlrpc_server.py.in: Updated to let the user select from
          a set of allowed library paths where the 'emulabserver' module
          should be imported from.  Import the 'emulabserver' module after the
          fork so we always get the latest version of the module.  Twiddled
          the necessary bits to turn on persistent connection support.
      f95e336d
  7. 29 Oct, 2004 1 commit
    • Timothy Stack's avatar
      · c61858c7
      Timothy Stack authored
      Make the hurting stop.  Make sshxmlrpc auto-detect things, fails over
      properly, and dump useful information when it is unable to deal with
      the peer.
      
        * xmlrpc/sshxmlrpc.py: Major update.  It now tries to autoconfigure
          itself by scanning the path for "ssh" and "plink.exe" (although I
          haven't actually tried it on windows).  Environment variables can
          now be used to turn on debugging and set the command to use for
          doing the ssh.  Before running ssh, it will check for an agent or
          a passphrase-less key and prints a warning if it finds neither.
          The last five lines read from the server, as well as the standard
          error output, are stored so they can be dumped later; helpful for
          figuring out what is actually being run on the other side.  The
          protocol layer between ssh and xml-rpc will now respond to a
          "probe" header so that clients can figure out who they are talking
          too.  The server side will now properly detect a closed connection
          and not write anything, which means no more annoying "Write to
          stdout failed" messages.  You can now pass additional options to
          ssh and set the identity.  The module can be run standalone, with
          the default action being to probe the peer:
      
            $ ./sshxmlrpc.py ssh://boss/xmlrpc
            Probe results for: ssh://boss/xmlrpc
              response time=1.49 s
            Response Headers
              date: Wed Oct 27 16:10:58 2004
      	content-length: 0
      	probe: /usr/testbed/devel/stack/lib/sshxmlrpc.py
      	probe-response: EmulabServer
      
        * xmlrpc/sshxmlrpc_server.py.in: Set the value returned by a "probe"
          to the name of the invoked module.  This way, the other side can
          figure out who they are talking to (e.g. EmulabServer
          vs. experiment vs. fs vs. osid).
      
        * event/sched/event-sched.c, event/sched/rpc.cc, event/sched/rpc.h,
          xmlrpc/script_wrapper.py.in: Multiple paths (e.g. xmlrpc,
          $prefix/sbin/sshxmlrpc_server.py) are now probed before giving up.
          Force the use of the user's default identity and protocol one.
          For event-sched, a single connection is now made at startup and
          dropped before going into the event loop.
      
        * event/sched/GNUmakefile.in: Add a dependency for the install
          target and add -I$(OBJDIR) to the CXXFLAGS.
      
        * install/ports/ulsshxmlrpcpp/Makefile,
          install/ports/ulsshxmlrpcpp/distinfo,
          install/ports/ulsshxmlrpcpp/pkg-descr: Bump version number to 1.1
          and tweak the description.
      
        * config.h.in, configure, configure.in: Add a "#define TBROOT" that
          has the install prefix.
      c61858c7
  8. 30 Aug, 2004 1 commit
    • Leigh Stoller's avatar
      The bulk of the event system changes. · 9aa6b5ca
      Leigh Stoller authored
      * The per-experiment event scheduler now runs on ops instead of boss.
        Boss still runs elvind and uses events internally, but the user part
        of the event system has moved.
      
      * Part of the guts of eventsys_control moved to new script, eventsys.proxy,
        which runs on ops and fires off the event scheduler. The only tricky part
        of this is that the scheduler runs as the user, but killing it has to be
        done as root since a different person might swap out the experiment. So,
        the proxy is a perl wrapper invoked from a root ssh from boss, which
        forks, writes the pid file into /var/run/emulab/evsched/$pid_$eid.pid,
        then flips to the user and execs the event scheduler (which is careful
        not to fork). Obviously, if the kill is done as root, the pid file has to
        be stored someplace the user is not allowed to write.
      
      * The event scheduler has been rewritten to use Tim's C++ interface to the
        sshxmlrpc server on boss. Actually, I reorg'ed the scheduler so that it
        can be built either as a mysql client, or as RPC client. Note that it can
        also be built to use the SSL version of the XMLRPC server, but that will
        not go live until I finish the server stuff up. Also some goo for dealing
        with building the scheduler with C++.
      
      * Changes to several makefiles to install the ops binaries over NFS to
        /usr/testbed/opsdir. Makes life easier, but only if boss and ops are
        running the same OS. For now, using static linking on the event scheduler
        until ops upgraded to same rev as boss.
      
      * All of the event clients got little tweaks for dealing with the new CNAME
        for the event system server (event-sever). Will need to build new images
        at some point. Old images and clients will continue to work cause of an
        inetd hack on boss that uses netcat to transparently redirect elvind
        connections to ops.
      
      * Note that eventdebug needs some explaining. In order to make the inetd
        redirect work, elvind cannot be listening on the standard port. So, the
        boss event system uses an alternate port since there are just a few
        subsystems on boss that use the server, and its easy to propogate changes
        on boss. Anyway, the default for eventdebug is to connect to the standard
        port on localhost, which means it will work as expected on ops, but will
        require -b argument on boss.
      
      * Linktest changes were slightly more involved. No longer run linktest on
        boss when called from the experiment swapin path, but ssh over to ops to
        fire it off. This is done as the user of course, and there are some
        tricks to make it possible to kill a running linktest and its ssh when
        experiment swapin is canceled (or from the command line) by forcing
        allocation of a tty. I will probably revisit this at some point, but I
        did not want to spend a bunch of time on linktest.
      
      * The upgrade path detailed in doc/UPDATING is necessarily complicated and
        bound to cause consternation at remote sites doing an upgrade.
      9aa6b5ca