1. 06 Apr, 2005 1 commit
  2. 30 Mar, 2005 1 commit
  3. 07 Mar, 2005 1 commit
    • Timothy Stack's avatar
      · 898cf9a2
      Timothy Stack authored
      Checkin some changes related to experiment automation and vnode feedback:
      
      	* configure, configure.in: Add sensors/canaryd/feedbacklogs
      	template.
      
      	* db/libdb.pm.in, db/xmlconvert.in: Add "virt_user_environment"
      	table that holds environment variable names and values.
      
      	* event/lib/event.c: Allocate memory of the right size for
      	event_notifications.
      
      	* event/program-agent/GNUmakefile.in: Add version.c file and
      	add install targets for the man page.
      
      	* event/program-agent/program-agent.8: Man page describing the
      	program-agent daemon.
      
      	* event/program-agent/program-agent.c: Add a bunch of convenience
      	features: let the user specify the working directory for commands;
      	save output to separate files on every invocation of an agent; let
      	the user specify a timeout for a command; make the set of
      	environment variables sane and add vars given in the NS file in
      	the opt array; a "status" file containing process information is
      	written out when children are collected.  Internal changes: child
      	processes are collected immediately, instead of waiting for the
      	next START event, so we can send back COMPLETE events; the daemon
      	now runs with a real-time priority, to increase the chances of
      	receiving events.
      
      	* event/proxy/evproxy.c: Made it bidirectional so the
      	program-agent's COMPLETE events make it back to the scheduler.
      
      	* event/sched/error-record.c: Change the default log directory.
      
      	* event/sched/event-sched.h, event/sched/event-sched.c: Setup an
      	environment similar to a program-agent to run the user's log
      	digester.
      
      	* event/sched/node-agent.cc: Add a handler for the SNAPSHOT event
      	that runs create_image for the node.
      
      	* event/sched/simulator-agent.h, event/sched/simulator-agent.cc:
      	Let the user specify a "DIGESTER" script that digests the log
      	files into a summary of the results.  Add event handler for
      	remapping a vnode experiment.
      
      	* event/sched/timeline-agent.c: Accept the RUN event as well as
      	the START event.
      
      	* os/GNUmakefile.in: Install the install-tarfile.1 man page.
      
      	* os/install-tarfile: Automatically chown/chgrp any files that do
      	not have valid user or group IDs, the new owner will be the user
      	that swapped in the experiment.  Include the install directory in
      	the DB file.  Add a "list" mode that just dumps what files have
      	been installed and where.  Add a "force" option so the user can
      	forcefully install the file, even though the DB says its already
      	there.
      
      	* os/install-tarfile.1: Man page describing the install-tarfile
      	tool.
      
      	* os/syncd/GNUmakefile.in: Install man pages on ops.
      
      	* sensors/canaryd/GNUmakefile.in: Link canaryd statically and
      	install "feedbacklogs" tool.
      
      	* sensors/canaryd/canaryd.c: Dump dummynet pipe data.
      
      	* sensors/canaryd/canarydEvents.c: Log errors.
      
      	* sensors/canaryd/feedbacklogs.in: Tool used to generate feedback
      	data from canaryd log files.
      
      	* sensors/slothd/GNUmakefile.in: Install digest-slothd on ops.
      
      	* sensors/slothd/digest-slothd: Fix some bugs and write out an
      	"alert" file with all the nodes/links that were overloaded.
      
      	* tbsetup/os_load.in, tbsetup/libosload.pm.in: Add "waitmode"
      	argument that lets you specify that you want to wait for the disk
      	to finish loading and/or wait for the node to come back up in the
      	new OS.
      
      	* tbsetup/power.in: Remove debugging printf.
      
      	* tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/program.tcl,
      	tbsetup/ns2ir/sequence.tcl, tbsetup/ns2ir/sim.tcl.in: Fix some
      	quoting problems with event-sequences.  Add -expected-exit-code
      	and -tag options to the "$program run" event.  Add -digester to
      	the "$ns report" event that lets the user specify a program to run
      	to digest the log files.
      
      	* tbsetup/ns2ir/tb_compat.tcl.in: Change the initial scaling
      	factor for feedback nodes to 1%, instead of 100%.
      
      	* tmcd/tmcd.c, tmcd/common/libtmcc.pm: Add "userenv" command that
      	returns the values in "virt_user_environment".  Return new program
      	agent fields: dir, timeout, and expected_exit_code.
      
      	* tmcd/common/GNUmakefile.in: Install rc.canaryd.
      
      	* tmcd/common/bootvnodes: Add hack to boost the program-agents to
      	a real-time priority, they can't do it from inside the jail.
      
      	* tmcd/common/rc.canaryd: Rc script for canaryd.
      
      	* tmcd/common/watchdog: Don't fail outright if there is a bad line
      	in the battery.log
      
      	* tmcd/common/rc.progagent: Append "userenv" data to the
      	program-agent config file.
      
      	* utils/GNUmakefile.in: Install loghole and its man page on ops.
      
      	* utils/loghole.1: Document "clean" command and the change in
      	loghole directories.
      
      	* utils/loghole.in: Add "clean" command and parallelization.
      
      	* xmlrpc/emulabserver.py.in: Add "virt_user_environment" table.
      	Order the eventlist by "idx" and time, needed for sequences.  And
      	removed unnecessary nologin checks.
      898cf9a2
  4. 17 Feb, 2005 1 commit
  5. 02 Feb, 2005 1 commit
    • Leigh B. Stoller's avatar
      Add tb-set-delay-capacity NS directive: · 21044084
      Leigh B. Stoller authored
      	tb-set-delay-capacity 1
      
      Will override the default delay capacity as specfied in the node_types
      table for each node type, and set it for all types when generating the
      ptop file.
      
      This is a big stick, to be used with caution, as it will effectively
      double the number of nodes used for delay nodes (withing an experiment).
      21044084
  6. 28 Jan, 2005 1 commit
    • Leigh B. Stoller's avatar
      Changes to elabinelab setup. The source code for inner boss/ops no · 03cf92cb
      Leigh B. Stoller authored
      longer comes from the project directory (really, my source directory
      in the various projects). Instead, the source code comes from one of
      two places:
      
      * Using fetch on the inner ops and boss, make a special request to the
        outer webserver to return a tarball, currently stored in
        /usr/testbed/src, and created by toplevel makefile target "elabinelab".
        So, in your object tree (preferably one that is pure, without any of your
        own hacks) run "make elabinelab" and it will create the tarfile for you.
        The tarball is returned only to elabinelab experiments providing the
        experiment secret key (a variant of the existing spewrpmtar file stuff).
      
      * Using the standard tarfile install command, albiet indrectly cause of how
        we hide all of the elabinelab NS goo. So, in your NS file you can do:
      
      	tb-elab-in-elab 1
      	set ::TBCOMPAT::elabinelab_source_tarfile \
      			"/proj/testbed/tarfiles/emulab-src.tar.gz"
      
        Which will arrange for this tarfile to be installed in /usr/src, and then
        copied to the approriate place later when inner boss and inner ops are
        setup. The tarfile should be created in the top of your testbed source
        tree. This is given preference over method 1 above.
      
      XXX Currently the tarfile is unpacked in /usr/src cause install-tarfile
      does not create the target directory. As soon as we have new images, I'll
      move this unpacking to a more suitable place.
      03cf92cb
  7. 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
  8. 10 Jan, 2005 1 commit
  9. 09 Dec, 2004 1 commit
    • Leigh B. Stoller's avatar
      Okay, here is the current development approach for dealing with · 5a4e9df8
      Leigh B. Stoller authored
      ElabinElab experiments that wrap another experiment, either firewalled
      or not. This instead of my security level stuff, that I decided was
      too much of a pain the user, at least for now. New NS syntax:
      
      	tb-set-inner-elab-eid two-simple
      
      In the ElabinElab file, sets the name of an existing experiment in the
      same project. Experiment is parsed, and after the parse we notice in
      tbprerun that we have an inner eid, so we reparse the NS file, only
      this time we pass in the maximum number of nodes needed by the inner
      eid (tbprerun now computes min/max nodes at prerun time, instead of
      later as first part of swapin). This number is used to allocatethe
      appropriate number of inner experimental nodes. Why do it this way?
      Cause the NS parser is the only tool we have for generating the virt
      topology, and I do not want go down the path of inventing a new
      frontend.
      
      Anyway, after the reparse, we now have the proper number of nodes in
      the wrapper experiment. Now its simply a matter of copying over the
      type and fixnode info from the inner experiment to the outer
      experiment.  Why? So that when the outer experiment is swapped in, it
      gets the nodes (of the right type/fixnode) that the inner experiment
      is going to want later, when it is swapped in by the inner emulab!
      
      Another approach would be to make elabinelab and elabinelab_eid
      options to batchexp (and thus the web form and XMLRPC interface) so
      that we can avoid the double parse. I suspect people do not want more
      crap on the web form, so I did not do it this way.
      5a4e9df8
  10. 08 Dec, 2004 1 commit
  11. 06 Dec, 2004 1 commit
  12. 08 Oct, 2004 1 commit
    • Timothy Stack's avatar
      · ed8262c1
      Timothy Stack authored
      Made a pass over tar file related things:
      
      	* os/install-tarfile: Added support for bzip2 compressed files and
      	fixed the '.tgz' regex (it detected '.tar.tgz' before).  Also
      	binmode'd some file handles to squelch a warning on Redhat 9.
      
      	* tbsetup/fetchtar.proxy.in: Added 'https' as a valid protocol for
      	URLs and 'tar.bz2' as a valid extension.  Changed the wget call to
      	do 'timestamping', which means it should only download files that
      	have changed since the last download.
      
      	* tbsetup/tarfiles_setup.in: More 'https' and '.tar.bz2' stuff.
      	When downloading tarballs, copy the file name extension from the
      	URL onto the local file name so 'install-tarfile' can figure out
      	how to decompress it properly.
      
      	* tbsetup/ns2ir/tb_compat.tcl.in: Added a bunch of checks to the
      	tb-set-node-tarfiles function.
      
      	* www/faq.html, www/tutorial/nscommands.html,
      	www/tutorial/tutorial.html: Flesh out and clean up tarfile related
      	documentation.  Also added anchors for the individual functions so
      	you can link to them from other pages.
      ed8262c1
  13. 17 Sep, 2004 1 commit
  14. 10 Aug, 2004 1 commit
  15. 27 Jul, 2004 1 commit
  16. 19 Jul, 2004 1 commit
  17. 12 Jul, 2004 1 commit
  18. 07 Jul, 2004 1 commit
  19. 10 May, 2004 1 commit
    • Robert Ricci's avatar
      Allow the user to give an estimated bandwidth for links and/or LANs. · 923063cc
      Robert Ricci authored
      This is in addition to the normal bandwidth, and the difference is
      that the estimated bandwidth is not enforced. It's just fed to assign
      for mapping decisions. The idea is to allow for more efficient
      packings by doing non-conservative bandwidth allocation.
      
      Not documented yet, because it might change a little after I made it
      work properly with asymmetric links.
      923063cc
  20. 30 Apr, 2004 1 commit
    • Leigh B. Stoller's avatar
      Small hack requested by Jay to aid in creating wireless nodes; added · 45e5e3c7
      Leigh B. Stoller authored
      new directive for your NS file: tb-use-physnaming(1) which means that
      if you have a line like this:
      
      	set pc6 [$ns node]
      
      and pc6 is an actual name of a physical node, then do an implicit
      "fixnode" to pc6. In other words, pc6 is the name of the node in your
      NS file (virtual topo) *and* will be fixed to the real pc6. Needless
      to say, if pc6 is allocated when you go to swapin, you lose.
      45e5e3c7
  21. 12 Apr, 2004 1 commit
    • Leigh B. Stoller's avatar
      The core of the wireless support code. · 86155d03
      Leigh B. Stoller authored
      * ptopgen:
      
         1. Change to using interface_capabilities table to get the default
            speed for an interface type.
      
         2. The wrinkle is that an interface can have multiple speeds,
            depending on the protocol that is requested. In the wireless case the
            table looks like:
      
      	| type             | capkey            | capval               |
      	+------------------+-------------------+----------------------+
      	| ath              | protocols         | 80211a,80211b,80211g |
      	| ath              | 80211a_defspeed   | 54000                |
      	| ath              | 80211b_defspeed   | 11000                |
      	| ath              | 80211g_defspeed   | 54000                |
      
         3. We use the above info to tell us the default speed for links, based
            on the particular protocol.
      
         4. And lastly, create "air" switches for each of 80211a, 80211b, 80211g,
            and specify links from the switches to the nodes that have interfaces
            that support those protocols. At the moment, there is a hardwired
            list of 80211a, 80211b, 80211g in ptopgen, so create 3 new air
            switches and links from each of the nodes to each of the switches.
            Rob says that assign can handle this just fine (using the same
            interface on a node to connect to three different air switches, at
            different speeds).
      
      * assign_wrapper:
      
         1. First off, I had to increase the bogousity factor of how we determine
            that a delay node is required (requires_delay() routine) on a link or
            lan. Using the interface_capabilities table, I determine the default
            speed for each protocol on each interface type.
      
         2. When calling requires_delay() I now the pass the lan so that we can
            get the "protocol" of the link/lan and use that to find the default
            speed. The main reason for all this crud is that if a user specifies
            a bandwidth of 54Mb on a wired ethernet, we want to make sure we
            insert a delay node, but not if the user is using 80211g. As it was,
            delay nodes would be skipped cause there are now nodes with
            interfaces that support those speeds. This change also allows to know
            that a delay node should be inserted on a wireless link, if we ever
            wanted to do something as silly as that!
      
         3. Okay, so now onto the actual wireless support!  Whenever the protocol
            for a lan is not "ethernet" spit out links to fake lan nodes, sorta
            like we used to do with ethernet lans before Rob made all those great
            changes to assign. So, a lan with protocol 80211a will get fake links
            to the 80211a air switch that ptopgen spits out (see above).  We
            currently bypass all delay node processing on wireless lans, and in
            fact we avoid most post-processing (after assign) of wireless lans
            (no vlans, veths, etc). At some point we can bring certain things
            back in (like emulated links) but that will be some time! See
            comments above about ptopgen.
      
         4. Added a section to copy over the virt_lan_settings and
            virt_lan_member_settings to the interface_settings table, for each
            node's interfaces in the mapped experiment. I also make up the ssid
            for the lan, and add the protocol to the settings so that the client
            side knows what it is supposed to do. I also set the acesspoint since
            that requires MAC addresses, and this is easiest place to get and set
            the MAC (all of the nodes in a lan need to know the MAC of the node
            acting as the access point). In the virtual topology, the accesspoint
            is specified as a node name.
      
      * tbsetup/ns2ir:
      
         1. Add tb-set-lan-protocol(lan, protocol) to set the protocol to one of
            ethernet, 80211a, 80211b, 80211g. Defaults to ethernet.
      
         2. Add tb-set-lan-accesspoint(lan, accesspoint) to set the name of the
            access point for a lan. Obviously this makes sense for only wireless
            links; ignored for wired links.
      
         3. Add tb-set-lan-setting(lan, setting, value) to specify a setting that
            applies to the entire lan. At present, these are ignored for wired
            lans. Both setting and value are strings.
      
         4. Add tb-set-node-lan-setting(lan, node, setting, value) to specify a
            setting that applies to a particular node in a lan. At present, these
            are ignored for wired lans. Both setting and value are strings.
      86155d03
  22. 07 Apr, 2004 1 commit
  23. 10 Feb, 2004 1 commit
  24. 03 Feb, 2004 1 commit
  25. 29 Jan, 2004 1 commit
  26. 28 Jan, 2004 1 commit
  27. 20 Jan, 2004 1 commit
  28. 10 Dec, 2003 2 commits
  29. 01 Dec, 2003 1 commit
    • Robert Ricci's avatar
      New scripts: tarfiles_setup, fetchtar.proxy, and webtarfiles_setup . · c0c6547c
      Robert Ricci authored
      The idea is to give us hooks for grabbing experimenters' tarballs (and
      RPMs) from locations other than files on ops. Mainly, to remove
      another dependance on users having shells on ops.
      
      tarfiles_setup supports fetching files from http and ftp URLs right
      now, through wget. It places them into the experiment directory, so
      that they'll go away when the experiment is terminated, and the rest
      of the chain (ie. downloading to clients and os_setup's checks)
      remains unchaged.  It is now tarfiles_setup's job to copy tarballs and
      RPMs from the virt_nodes table to the nodes table for allocated nodes.
      This way, it can translate URLs into the local filenames it
      constructs. It get invoked from tbswap.
      
      Does the actual fetching over on ops, running as the user, with
      fetchtar.proxy.
      
      Should be idempotent, so we should be able to give the user a button
      to run webtarfiles_setup (none exists yet) yet to 'freshen' their
      tarballs. (We'd also have to somehow let the experiment's nodes know
      they need to re-fetch their tarballs.)
      
      One funny side effect of this is that the separator in
      virt_nodes.tarfiles is now ';' instead of ':' like nodes.tarballs,
      since we can now put URLs in the former. Making these consistent is a
      project for another day.
      c0c6547c
  30. 15 Sep, 2003 2 commits
  31. 11 Sep, 2003 2 commits
  32. 04 Sep, 2003 1 commit
    • Leigh B. Stoller's avatar
      Add variable netmask support to the parser. You can now do this in · 7d524fde
      Leigh B. Stoller authored
      your NS file:
      
      	tb-set-netmask $lan0  "255.255.240.0"
      	tb-set-netmask $link0 "255.255.255.248"
      	tb-set-netmask $link1 "255.255.255.240"
      
      Yep, more rope for the user to hang herself with. Notes:
      
      * You are restricted to 255.255.XXX.XXX. I did not see a reason to
        allow the user that much rope.
      
      * get_subnet can handle 10 or 192.168 addresses so that other sites
        can continue to operate without changing to 10 addresses, although
        they will still be able to change the netmask.
      
      * I've changed the handling for widearea networks to use 192.168, but
        I force the netmask to 255.255.255.248 so that we are not restricted
        to just 255 networks (not that it really matters). To avoid possible
        confusion, the user is not allowed to choose their own IPs for
        widearea networks, and I actually set them to 1.1.x.x, and then
        patch it up later. This is to avoid conflict with existing
        experiments where people may have used tb-set-ip in their NS files.
      
      * There are tmcd and staticroutes and image changes that are required
        to make this all work right!
      7d524fde
  33. 09 Aug, 2003 1 commit
    • Leigh B. Stoller's avatar
      Support for subnodes: · d053d84e
      Leigh B. Stoller authored
      	set myixp [$ns node]
      	set ixphost [$ns node]
      	tb-set-hardware $myixp ixp-bveil
      	tb-fix-node $myixp $ixphost
      	tb-set-node-os $ixphost RHL-STD
      
      This gives you a handle on the host node so you can treat it like a
      normal testbed node, including setting the OSID.
      
      There are associated assign_wrapper changes, but I won't check those
      in till I get back from vacation; not enough people around this coming
      week in case I screwed something up.
      d053d84e
  34. 07 Aug, 2003 1 commit
  35. 06 Aug, 2003 1 commit
    • Leigh B. Stoller's avatar
      Two new functions: · 27cc5adc
      Leigh B. Stoller authored
      * A node method to create a startup routine:
      
      	$node start-command "$mydir/batchcmd.sh >& $mydir/b1.log"
      
      * And some old style syntactic pepper:
      
      	tb-set-node-startcommand $nodeb1 "$mydir/batchcmd.sh >& $mydir/b1.log"
      
      The latter is intended to replace the exiting tb-set-node-startup
      function. The new implementation of the above is to use a program
      object that starts at time 0.
      27cc5adc
  36. 05 Aug, 2003 1 commit
    • Leigh B. Stoller's avatar
      The rest of the sync server additions: · 212cc781
      Leigh B. Stoller authored
      * Parser: Added new tb command to set the name of the sync server:
      
      	tb-set-sync-server <node>
      
        This initializes the sync_server slot of the experiment entry to the
        *vname* of the node that should run the sync server for that
        experiment. In other words, the sync server is per-experiment, runs
        on a node in the experiment, and the user gets to chose which node
        it runs on.
      
      * tmcd and client side setup. Added new syncserver command which
        returns the name of the syncserver and whether the requesting node
        is the lucky one to run the daemon:
      
          SYNCSERVER SERVER='nodeG.syncserver.testbed.emulab.net' ISSERVER=1
      
        The name of the syncserver is written to /var/emulab/boot/syncserver
        on the nodes so that clients can easily figure out where the server
        is.
      
        Aside: The ready bits are now ignored (no DB accesses are made) for
        virtual nodes; they are forced to use the new sync server.
      
      * New os/syncd directory containing the daemon and the client. The
        daemon is pretty simple. It waits for TCP (and UDP, although that
        path is not complete yet) connections, and reads in a little
        structure that gives the name of the "barrier" to wait for, and an
        optional count of clients in the group (this would be used by the
        "master" who initializes barriers for clients). The socket is saved
        (no reply is made, so the client is blocked) until the count reaches
        zero. Then all clients are released by writting back to the
        sockets, and the sockets are closed. Obviously, the number of
        clients is limited by the numbed of FDs (open sockets), hence the
        need for a UDP variant, but that will take more work.
      
        The client has a simple command line interface:
      
          usage: emulab-sync [options]
          -n <name>         Optional barrier name; must be less than 64 bytes long
          -d                Turn on debugging
          -s server         Specify a sync server to connect to
          -p portnum        Specify a port number to connect to
          -i count          Initialize named barrier to count waiters
          -u                Use UDP instead of TCP
      
          The client figures out the server by looking for the file created
          above by libsetup (/var/emulab/boot/syncserver). If you do not
          specify a barrier "name", it uses an internal default. Yes, the
          server can handle multiple barriers (differently named of course)
          at once (non-overlapping clients obviously).
      
          Clients can wait before a barrier in "initialized." The count on
          the barrier just goes negative until someone initializes the
          barrier using the -i option, which increments the count by the
          count. Therefore, the master does not have to arrange to get there
          "first." As an example, consider a master and one client:
      
      	nodeA> /usr/local/etc/emulab/emulab-sync -n mybarrier
      	nodeB> /usr/local/etc/emulab/emulab-sync -n mybarrier -i 1
      
          Node A waits until Node B initializes the barrier (gives it a
          count).  The count is the number of *waiters*, not including the
          master. The master is also blocked until all of the waiters have
          checked in.
      
          I have not made an provision for timeouts or crashed clients. Lets
          see how it goes.
      212cc781
  37. 30 Jul, 2003 1 commit