1. 20 Jun, 2006 1 commit
    • Leigh Stoller's avatar
      /* · 46b277fe
      Leigh Stoller authored
       * Define vfork to fork. Why? Well starting at 6.X FreeBSD switched
       * its underlying pthread impl, and popen is broken in threaded apps,
       * since it uses vfork. I have no understanding of any of this, only
       * that avoiding vfork solves the problem.  We can back this change
       * out once we figure out a real solution.
       */
      46b277fe
  2. 08 Jun, 2006 1 commit
  3. 27 Apr, 2006 1 commit
    • Leigh Stoller's avatar
      Change the handling for when mysqld goes away (CR_SERVER_LOST || · c8fb3863
      Leigh Stoller authored
      CR_SERVER_GONE_ERROR). Instead of bailing, sit and loop trying to
      reconnect, given that this is known to be a transient error, and we do
      not really want our daemons to go belly up during that brief time when
      the watchdog is getting it restarted.
      
      This turns out to be nice in my elabinelab experiments, where very
      idle daemons have a habit of timing out, although there were other
      ways to deal with that, but I'm lazy.
      c8fb3863
  4. 09 Mar, 2006 1 commit
    • Sachin Goyal's avatar
      · ebb5dd08
      Sachin Goyal authored
      Added constant for plab scheduler.
      ebb5dd08
  5. 02 Feb, 2006 1 commit
    • Kirk Webb's avatar
      · 16686f26
      Kirk Webb authored
      Added "global passthru" event subscription to the plab event proxy.
      16686f26
  6. 01 Feb, 2006 1 commit
  7. 26 Jan, 2006 2 commits
    • Timothy Stack's avatar
      · 4b938465
      Timothy Stack authored
      Some pelab/plab event system hacks.
      
      	* event/lib/event.h, event/lib/event.c: Add event_subscribe_auth
      	which lets you specify whether any authentication should be done
      	for events received through this subscription.
      
      	* event/sched/event-sched.c: Handle EVPROXY objects.  Add a
      	separate subscription for EVPROXY UPDATE events for each plab
      	pnode (which might be too many...).  Also, need to update the EXPT
      	field for events received through a noauth subscription so the
      	proxies can figure out which experiments are active.
      
      	* lib/libtb/tbdefs.h, lib/libtb/tbdefs.c: Add UPDATE event defs.
      
      	* xmlrpc/emulabserver.py.in: Inject __plab_setup and
      	__plab_teardown timelines into the eventlist when an experiment
      	has plab nodes.  The __plab_setup timeline sends EVPROXY UPDATE
      	events to each physical node while the __plab_teardown sends
      	EVPROXY CLEAR events.  The __plab_setup timeline is run when the
      	scheduler starts up, the __plab_teardown isn't run automatically
      	yet.
      4b938465
    • Timothy Stack's avatar
      Add EVPROXY event_objecttype · 0e4c30e0
      Timothy Stack authored
      0e4c30e0
  8. 16 Nov, 2005 1 commit
  9. 19 Aug, 2005 1 commit
  10. 17 Jun, 2005 1 commit
    • Timothy Stack's avatar
      · 41d4c6d4
      Timothy Stack authored
      Event system documentation and tweaks:
      
      	* event/sched/event-sched.c: The snapshot event got left out of
      	the list of events that send back a complete event.  If a top
      	level sequence stops with an error, automatically send a report.
      
      	* event/sched/group-agent.c, event/sched/timeline-agent.c: When
      	handling a complete event, return true if the event was consumed.
      
      	* event/sched/node-agent.cc: Clean the "/local/logs" loghole on
      	the node before taking a snapshot of the disk image.
      
      	* event/sched/simulator-agent.cc, event/sched/simulator-agent.h:
      	Made send_report non-static so it can be called when a sequence
      	errors out.  Actually check the clear flag when dumping report
      	data.
      
      	* lib/libtb/tbdefs.c: Add a comment about updating the event
      	scheduler when a new object type is added.
      
      	* tbsetup/ns2ir/sim.tcl.in: Check the OSIDs passed to the "reload"
      	and "snapshot-to" events.
      
      	* utils/loghole.1: Mention early and often the directories that
      	gets sync'd.  Document the 'change' action and new options for
      	'clean'.
      
      	* utils/loghole.in: Use rsync's '--include-from' option so we
      	don't have to run rsync separately for each directory.  Add a
      	'change' action that lets people mess with the metadata of an
      	existing archive.  Make the 'clean' action also remove log files
      	on the nodes.  Only rsync node's whose OS's support ssh.  Grab
      	logs from delay nodes.
      
      	* www/tutorial/advanced.html: Update the program agent examples to
      	use the new form.
      
      	* www/tutorial/eventsystem.html: First cut at an event system
      	reference manual that includes sequences, timelines, and other
      	new features.
      
      	* www/tutorial/loghole.html: Just a pointer to the man page on ops
      	for now.
      
      	* www/tutorial/nscommands.html: Add a section about capturing
      	parameters from the 'opt' array.
      
      	* xmlrpc/emulabserver.py.in: Add an osid.info() method that
      	returns information about a single OSID.
      41d4c6d4
  11. 10 Jun, 2005 1 commit
  12. 24 May, 2005 1 commit
    • Timothy Stack's avatar
      · cf9ae072
      Timothy Stack authored
      Add topography as an event object type, we use this to notify applets
      about dynamic obstacles.  Some event-sched fixes are also included.
      
      	* lib/libtb/tbdefs.h, lib/libtb/tbdefs.c: Add TOPOGRAPHY object
      	and CREATE event.
      
      	* robots/emc/emcd.c: Some cleanup for the events that get sent for
      	dynamic obstacles.
      
      	* tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/sim.tcl.in,
      	tbsetup/ns2ir/topography.tcl: Add Topography's to the virt_agents
      	table.
      
      	* event/sched/error-record.c: Fix the format for the filenames
      	generated by the program-agent.
      
      	* event/sched/event-sched.c: Mark the start of TIME, change how
      	rmcd/vmcd get restarted, and fix the ordering of some events on
      	startup.
      
      	* event/sched/simulator-agent.h, event/sched/simulator-agent.cc:
      	Record when TIME starts, change how the report is generated, and
      	the current time to log messages.
      
      	* event/sched/rpc.h, event/sched/rpc.cc: Add the "virtual"
      	topography name to the emcd.config, it's used when sending events
      	concerning dynamic obstacles.
      cf9ae072
  13. 04 Apr, 2005 1 commit
    • Timothy Stack's avatar
      · 463ee6b1
      Timothy Stack authored
      Mote and robot related stuff.  The main thing is the addition of relay
      capabilities to capture and related things.
      
      	* GNUmakefile.in: Add the capture and tip subdirectories to the
      	client and client-install targets.
      
      	* configure, configure.in, config.h.in: Detect srandomdev() for
      	capture and add "mote/newmote" script.
      
      	* capture/GNUmakefile.in, capture/capture.c: Add "relay"
      	capabilities to capture.
      
      	* capture/capquery.c: Query the capserver for the relay receiver's
      	port number.
      
      	* capture/capserver.c: Small hack to return the port number
              for a node.
      
      	* db/libdb.pm.in, db/xmlconvert.in: Add virt_tiptunnels table.
      
      	* event/program-agent/program-agent.c: Change log file names to
      	something a little more user-friendly.  Add a "MODIFY" event
      	handler that lets the user set agent attributes (command, tag,
      	timeout) without having to run a program.
      
      	* event/sched/GNUmakefile.in, event/sched/console-agent.cc,
      	event/sched/console-agent.h, event/sched/event-sched.c: Add
      	console agents that can be used to snapshot a section of the
      	capture log file.
      
      	* event/sched/node-agent.cc: Some minor cleanup.
      
      	* event/sched/simulator-agent.cc, event/sched/simulator-agent.h:
      	Add the config data to the report mail.  Add a "RESET" event
      	handler that runs "loghole clean".  Save the report mail in a file
      	so it gets archived with the rest of the logs.
      
      	* lib/libtb/tbdefs.h: Add CONSOLE object type.
      
      	* mote/GNUmakefile.in, mote/newmote: Add newmote script, just a
      	quick hack to add motes to the DB.
      
      	* mote/tbuisp.in: Add another backend for loading motes through
      	their relay capture server.
      
      	* robots/mtp/mtp_dump.c: Dump the min/max values for x and y,
      	handy for figuring out the bounds of the camera.
      
      	* sql/database-fill.sql: Change the RELOAD-MOTE/SHUTDOWN ->
      	ALWAYSUP/SHUTDOWN mode transition to ALWAYSUP/ISUP since stated
      	doesn't seem to run triggers after a state change by a mode
      	transition.
      
      	* tbsetup/tbreport.in: Change the ordering of the eventlist so it
      	displays event-sequences appropriately.
      
      	* tbsetup/ns2ir/GNUmakefile.in, tbsetup/ns2ir/console.tcl,
      	tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/parse.tcl.in,
      	tbsetup/ns2ir/sim.tcl.in: Add a "console" agent that represents
      	the serial console for a node.
      
      	* tbsetup/ns2ir/sequence.tcl: Add an "append" method so it is
      	easier to build sequences dynamically.
      
      	* tbsetup/ns2ir/topography.tcl: Make checkdest available to
      	regular users.
      
      	* tip/GNUmakefile.in, tip/tiptunnel.c: Add support for uploading a
      	file to a relay version of capture and exporting the end
      	connection as a pty.
      
      	* tmcd/decls.h, tmcd/common/libsetup.pm: Bump version number since
      	the dosubnodelist change is not backwards compatible.
      
      	* tmcd/tmcd.c: Make dosubnodelist and dosubconfig callable even
      	when a node isn't allocated.  Add dotiptunnels command that
      	returns which serial consoles are to be mounted on a node.  Add
      	mote version of subconfig that returns information needed to
      	startup the relay version of capture.
      
      	* tmcd/common/bootsubnodes: For motes, startup the relay version
      	of capture (XXX stargate specific).
      
      	* tmcd/common/libsetup.pm, tmcd/common/libtmcc.pm,
      	tmcd/common/config/rc.config, tmcd/common/config/rc.tiptunnels:
      	Client side changes for mounting another nodes serial line.
      
      	* tmcd/common/rc.bootsetup: Always boot the subnodes, even when
      	free.  This is used for motes since their capture needs to be up
      	for reloading at the time.
      
      	* tmcd/linux/ixpboot: Shuffle some code around so the script
      	doesn't fail if the ixp isn't allocated.
      
      	* utils/loghole.in: Add "digest.out" and "report.mail" as global
      	logs to be saved in archives and display the "report.mail" file
      	when showing a loghole archive.
      
      	* xmlrpc/emulabserver.py.in: Scrub more of the return values to
      	get rid of "None"s.
      463ee6b1
  14. 03 Feb, 2005 1 commit
  15. 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
  16. 06 Dec, 2004 1 commit
    • Timothy Stack's avatar
      · abebdbc6
      Timothy Stack authored
      Minor additions to support node mobility events:
      
      	* lib/libtb/tbdefs.h, lib/libtb/tbdefs.c, sql/database-fill.sql:
      	Add SETDEST as an event type and NODE as an object type.
      
      	* tbsetup/ns2ir/node.tcl:
      	Add location (X_, Y_, Z_) and orientation attributes for mobile
      	nodes.
      
      	* tbsetup/ns2ir/sim.tcl:
      	Add a "setdest" event for node types that lets the user move a
      	mobile node.
      abebdbc6
  17. 22 Sep, 2004 1 commit
  18. 14 Jul, 2004 2 commits
  19. 12 Jul, 2004 1 commit
  20. 24 Jun, 2004 1 commit
    • Mike Hibler's avatar
      Improve the client-side install. With these changes, it should now be · 976133e4
      Mike Hibler authored
      possible to:
      
      	gmake client
      	sudo gmake client-install
      
      on a FBSD4, FBSD5, RHL7.3, and RHL9.0 client node.
      
      There are still some dependencies that are not explicit and which would
      prevent a build/install from working on a "clean" OS.  Two that I know of are:
      you must install our version of the elvin libraries and you must install boost.
      976133e4
  21. 26 May, 2004 1 commit
  22. 20 Apr, 2004 1 commit
    • Mike Hibler's avatar
      Improve the client-install. You can now do a "make client-install" from · 361ee691
      Mike Hibler authored
      the top level.  This will build all the necessary binaries and then install
      them.  This works on FBSD4 and RHL7.3.  It still doesn't work on FBSD5
      (newer compiler that no longer supports a style of use of _FUNCTION_ in the
      event lib) or RHL9 (event lib needs SSL lib which has a bad dependency
      on Kerberos).  Notes:
      
      - requires that elvin libraries be installed on nodes (they are) to build
        event agents, requires linuxthreads be installed on FBSD (it is now) to
        build imagezip (which is installed, but is not strictly necessary)
      
      - installed event-agents and other binaries are stripped
      
      - added a few missing files to the source tree for bsd (healthd.conf)
        and linux (healthd.conf, rc.local)
      
      - the only thing that doesn't get rebuilt in /usr/local/etc/emulab is
        healthd, I couldn't quickly find how it gets built
      
      - uses a scaled down version of libtb with no DB functions (since mysql
        isn't installed on nodes).  N.B. DO NOT DO A CLIENT INSTALL FROM YOUR
        REGULAR OBJ TREE OR ELSE YOU MAY WIND UP WITH A NEUTERED VERSION OF
        libtb.a!
      
      The build-as-well-as-install semantics are counter to the regular install
      targets, but this is what we gotta do for now.  Once the TB source builds
      under Linux and newer BSDs, we could undo this and just require that people
      do a regular "make" followed by "make client-install"  OTOH, there should
      be no reason to require installation of mysql and other server-side packages
      just to build clients (or make them sit through the compilation of assign),
      so maybe we will keep the client build special.
      361ee691
  23. 02 Mar, 2004 1 commit
  24. 12 Jan, 2004 2 commits
  25. 23 Dec, 2003 1 commit
  26. 07 Dec, 2003 2 commits
    • Shashi Guruprasad's avatar
      fixed a mistake · 06be9146
      Shashi Guruprasad authored
      06be9146
    • Shashi Guruprasad's avatar
      Minimal NSE related changes on the mainbed so that I can work · 425b4e47
      Shashi Guruprasad authored
      in the dev tree. I'm tired of problems on the mini that wastes
      my time.
      
      Changes include 2 new tmcd commands: tmcc routelist returns
      the routes for all the vnodes hosted on a pnode. tmcc role
      returns the role of a reserved node, like 'virthost' or
      'simhost.  tmcc ifconfig now reports an RTABID field which
      is calculated in assign wrapper. All the new changes
      in assign wrapper will be checked in after I finish testing.
      
      All the DB changes are in: simnode_capacity in node_types, rtabid in
      interfaces and veth_interfaces. New NSE event_objtype and NSEEVENT
      event_eventtype. Changed the erole field in the reserved table
      to have 'simhost' instead of 'simnode'. Changed the correspoding
      libdb subroutines.
      425b4e47
  27. 18 Nov, 2003 1 commit
    • Leigh Stoller's avatar
      Minor additions for Shashi: · def28c32
      Leigh Stoller authored
      * Make the NS file an optional argument to swapexp modify; when not
        given the prerun phase is skipped. Instead, go directly to tbswap
        (run assign, etc).
      
      * Add NSESWAP event so that Shashi can fire off the above modify using
        tevc from an experimental node.
      
      	tevc -e pid/eid now ns nseswap
      
      * Change event scheduler to react to above event, and fire off:
      
      	nseswap pid eid
      
        as the user. The script should do its thing, and *exec* swapexp with
        the proper args as quickly as possible (so that the event scheduler
        is not hung up for too long. The script is invoked as the user,
        since the event scheduler is running as the user.
      def28c32
  28. 15 Oct, 2003 1 commit
    • Mike Hibler's avatar
      Uniform syslog'ing. Change everything I could find to use a syslog facility · cc6d6fa7
      Mike Hibler authored
      as defined in the defs-* file (e.g. "TBLOGFACIL=local2").  The default is
      "local5" which is what we are setup to use so you shouldn't need to mess
      with your defs- file!
      
      perl scripts just get this value configured in when configure is run.
      C programs get the value in two ways.  For programs that are intimate with
      the testbed infrastructure, and include "config.h", they just get it from
      that file.  For programs that we sometimes use outside the Emulab build
      environment (e.g., frisbee, capture) and that don't include config.h,
      the value is set via a "-DLOG_TESTBED=..." in the GNUmakefile build line.
      If the value isn't set, it defaults to what it used to be (usually LOG_USER).
      
      Still to do: healthd, hmcd (whose build doesn't seem to be completely
      integrated) and plabdaemon.in (since its icky python :-)
      cc6d6fa7
  29. 14 Oct, 2003 1 commit
  30. 07 Oct, 2003 1 commit
  31. 18 Sep, 2003 1 commit
  32. 27 Aug, 2003 1 commit
  33. 30 May, 2003 1 commit
  34. 29 May, 2003 1 commit
  35. 22 May, 2003 1 commit
  36. 01 May, 2003 1 commit
    • Leigh Stoller's avatar
      Add the long desired halt/swap event directives. You can now put this · 5116cd33
      Leigh Stoller authored
      in your NS file:
      
      	$ns at 2000.0 "$ns halt"
      or
      	$ns at 2000.0 "$ns swapout"
      
      The first causes the experiment to terminate, the later causes it to
      swap out. I know some wiseass is going to ask for a swapin event!
      You can also send these events from tevc:
      
      	tevc -e testbed/stopme now ns halt
      or
      	tevc -e testbed/stopme now ns swapout
      
      Does it need to be said that this is insecure? That we could get swap
      wars going on as people try to get nodes for their experiments by
      swapping out someone else? Well, if that happens we will apply the big
      hammer and squash their nuts.
      
      Details: I added an SIMULATOR "agent", and HALT/SWAPOUT event types in
      the usual places. In the event scheduler, SIMULATOR events are treated
      specially (not actually sent anywhere), but handled internally. Very
      convenient, cause the scheduler runs as the person who swapped the
      experiment in, and so I just run either swapexp or endexp, right from
      the scheduler. At some point we need to give the permission issue some
      thought.
      5116cd33