1. 05 Nov, 2003 1 commit
    • Leigh B. Stoller's avatar
      Frontend and parser portion of two event system changes: · 091a0b62
      Leigh B. Stoller authored
      * Generate a shared secret key for the event system. This key is
        stored into the DB, and passed to the node via tmcd. It is also
        stashed into a file in the experiment directory (can be accessed
        only by the project/group members). The key is used to attach a
        HMAC (hashed message authentication) to each event, which is checked
        by the receivers to ensure that the event is not bogus. More details
        on this later when I commit the event library/client changes.
      
      * Added "virt_programs" table to store info about each program object
        defined by the user. The intent is to no longer send the command
        string in the event, but to fix it in the DB, and transfer it via
        tmcd. This removes our "remote execution facility" which was always
        a bad idea (we have ssh for that, and that is a lot more secure then
        the event system!).
      
        Note that for the time being we need to continue send the command in
        the event because of old images, but the new images will now ignore
        that part of the event.
      091a0b62
  2. 26 Sep, 2003 1 commit
    • Robert Ricci's avatar
      New for subnodes: the host of a subnode now automatically gets a · 4e11b844
      Robert Ricci authored
      desire for 'hosts-<type>', where <type> is the type of its child node.
      This helps assign, because it can now limit the number of places to
      try assigning the host, and it means that we can give the hosts this
      feature, so that they don't get used for other purposes. For example,
      we can give the IXP-hosting nodes the feature 'hosts-ixp-bv' with
      weight 1, and they will never get used for anything but IXP hosting.
      
      This means that the node_type_features (or just node_features) table
      must now have hosts-<type> entires to work correctly.
      4e11b844
  3. 18 Sep, 2003 1 commit
  4. 11 Sep, 2003 1 commit
  5. 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
  6. 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
  7. 01 Aug, 2003 1 commit
  8. 30 Jun, 2003 1 commit
    • Leigh B. Stoller's avatar
      Make the new parser live on mini. New parser ssh'es over to ops to · 2202fc5a
      Leigh B. Stoller authored
      do the actual parse. The parser now spits out XML instead of DB
      queries, and the wrapper on boss converts that to DB insertions after
      verification. There are some makefile changes as well to install the
      new parser on ops via NFS, since otherwise the parser could
      intolerably out of date on ops!
      2202fc5a
  9. 19 Jun, 2003 1 commit
  10. 18 Jun, 2003 1 commit
  11. 05 Jun, 2003 1 commit
  12. 01 May, 2003 2 commits
    • Leigh B. Stoller's avatar
      Add "terminate" as alias for halt. · 366322fd
      Leigh B. Stoller authored
      366322fd
    • Leigh B. Stoller's avatar
      Add the long desired halt/swap event directives. You can now put this · 5116cd33
      Leigh B. 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...
      5116cd33
  13. 21 Apr, 2003 1 commit
  14. 18 Apr, 2003 1 commit
  15. 28 Feb, 2003 1 commit
    • Leigh B. Stoller's avatar
      Add queue objects to lan nodes. Also add a second hack class (LLink) · 7bdaf14f
      Leigh B. Stoller authored
      that allows the user to get a handle on that queue object so it
      can be changed. Add a routine (lanlink) to the sim class that operates
      much like link command (gets the hack class, which in turn is used to
      get the queue object).
      
      Note, there needs to be some work done in the event parser in sim.tcl
      to deal with lan queues (assumed to be link queues). I'll take care of
      that later.
      7bdaf14f
  16. 18 Dec, 2002 1 commit
    • Leigh B. Stoller's avatar
      Allow slightly altered tb-fix-node syntax for creating jails on local · d564e0fb
      Leigh B. Stoller authored
      nodes. The second argument can now be an NS node instead of the name
      of a real testbed node. For example:
      
      	tb-set-hardware $node3  pc600
      	tb-set-hardware $nodev1 pcvm600
      	tb-fix-node $nodev1 $node3
      
      So, "fix" $nodev1 to $node3. The intent is that once $node3 is
      allocated by assign to a real testbed node, we can then allocate a
      virtual node on pcXX to $nodev1. I did this primarily to allow for
      easy testing of jails via my NS file, without having to hack assign
      wrapper to deeply. Note there are still hacks in assign_wrapper to
      support this, but they are not extensive.
      
      Also my old usewatunnels stuff I never checked in:
      
      	tb-set-usewatunnels 0/1
      d564e0fb
  17. 06 Nov, 2002 1 commit
    • Shashi Guruprasad's avatar
      NSE related changes: · 05bc3bd4
      Shashi Guruprasad authored
        - Fixes the routing problem
        - A new type "sim" has been created but not in the DB. node_types and
          nodes remain unchanged. This will change after we figure out how
          to represent in the DB the local multiple virtnodes in one phynode case
          The frontend tb_compat.tcl adds the sim type and ptopgen associates
          a huge number of sim nodes to all local PCs.
        - All simulated nodes go into one pc untill I finish coding the distributed
          nse case. Also, sim nodes go through assign but with an explicit
          "fix-node" directive in the top file. A random free pc is chosen using
          the avail script in assign_wrapper. If we don't fix node it, assign
          maps sim nodes to multiple phy nodes even when a valid all to one
          mapping is possible.
        - Syntax for nse:
      
         $ns make-simulated {
      
             set simnode1 [$ns node]
             set simnode2 [$ns node]
      
         }
         ...
      
         The old syntax
      
         set nsenode [$ns nsenode]
         $nsenode make-simulated {
         }
      
         is deprecated
      
        - All 38 frontend tests in the testsuite pass
      
        - A new table v2pmap has been added to handle multiple virt nodes to
          one phy node mapping. This is used in "tmcc hostnames" currently.
      
        - The phy node that is picked to run nse is loaded with a custom image
          FBSD45-NSE . This can use the default FBSD kernel if there is a mechanism
          to run at 1000HZ, have options IPFIREWALL_FORWARD and PERFMON turned on.
          The image is in the 'testbed' group. Do not delete this image.
      
        - Static routes now adds routes for the case dst == nexthop. The routing
          graph would be disconnected otherwise and I need to traverse this in
          assign_wrapper for nse. On the client side, such a route is filtered out in
          libsetup.pm
      
        - sim nodes are also correctly visualized
      05bc3bd4
  18. 28 Oct, 2002 1 commit
  19. 25 Oct, 2002 1 commit
  20. 07 Jul, 2002 1 commit
  21. 31 May, 2002 1 commit
  22. 28 May, 2002 1 commit
  23. 22 May, 2002 1 commit
  24. 21 May, 2002 1 commit
  25. 16 May, 2002 2 commits
  26. 15 May, 2002 1 commit
  27. 14 May, 2002 1 commit
  28. 09 May, 2002 1 commit
    • Leigh B. Stoller's avatar
      Commit the static routing support. Invoked from tbprerun, after the · 712fe222
      Leigh B. Stoller authored
      parser runs. The staticroutes script is a wrapper for Chad's route
      solver. The network optimization is currently turned off; use -t to
      turn it on, until I know if its correct.
      
      Note that Chad gets credit for routecalc.cc; I'm just committing the
      file for him, with a couple of trivial changes that I made.
      712fe222
  29. 08 May, 2002 1 commit
    • Robert Ricci's avatar
      Add support for link costs for routing algorithm. These are specified · 6425980a
      Robert Ricci authored
      in the NS file in one of two ways:
      
      $ns cost $nodeA $nodeB 2
      or
      $link0 cost 3
      (The latter form can also be used for LANs)
      
      This information is stored in the database in the cost column of the
      virt_lans table.  It's important to note that cost data is _not_
      divided between the two sides of the link, as things like delay and
      rdelay are. Since there are no physical devices (ie.  delay nodes)
      node that this configuration needs to be split up between, doing so
      would just be unnecessary work.
      6425980a
  30. 24 Apr, 2002 1 commit
    • Leigh B. Stoller's avatar
      Add trafgen/reset event for Mike. The event only goes to the traffic · 50515097
      Leigh B. Stoller authored
      source, which is something of a problem. The ugly solution right now
      is to send reset events to both the source and sink (sink first I
      would think) if you need both sides to get it.
      
      	$ns at 1 "$null0 reset"
      	$ns at 1 "$cbr0 reset"
      
      Another option might be to internally create the second event for
      reset ...
      50515097
  31. 15 Apr, 2002 1 commit
    • Leigh B. Stoller's avatar
      Add static routing support: · d881770b
      Leigh B. Stoller authored
      	# Turn on manual routing.
      	$ns rtproto Manual
      
      	# Set manual routes
      	$nodeA add-route $nodeC $nodeB
      	$nodeC add-route $nodeA $nodeB
      
      results in this information being returned from the tmcd routing
      command:
      
      	ROUTERTYPE=manual
      	ROUTE DEST=192.168.2.3 DESTTYPE=host DESTMASK=255.255.255.0 \
      		NEXTHOP=192.168.3.2 COST=0
      
      The reason for DESTTYPE and DESTMASK is so that we can also support
      routing to links and lans, since doing it on a per host basis if not
      only hugely tedious, but plain impossible if the destination node has
      multiple links; the add-route syntax takes a node, but we need the IP
      of the relevant link in order to run the route add commands on the
      nodes. So, I've "extended" the syntax of add-route so that you can
      give it a Link or a Lan as the dest:
      
      	$nodeA add-route $link0 $nodeB
      	$nodeA add-route [$ns link $nodeB $nodeC] $nodeB
      
      In this case, the DESTTYPE=net, and the netmask is no longer ignored;
      it is used in the route add command. Currently, the mask is hardwired
      in the DB to 255.255.255.0, but by providing it in the tmcd command,
      we change it later if needed.
      
      I did not implement add-route-to-adj-node since that is not really
      useful in our context, and we definitely do not want the user to
      change the default routes on his nodes. But, its easy to add if we
      need to.
      
      The client side stuff is not done yet.
      d881770b
  32. 08 Apr, 2002 1 commit
  33. 27 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Some small additions to support events after Chris' queue changes. · addc8b02
      Leigh B. Stoller authored
      Queue events have a new parameter in the arg list for link events:
      
      	ARGS="PIPE=pipe0 THRESH=8"
      
      This is kinda hacky right now; I do not have time to get all the stuff
      just right. The convention is that pipe0 is the first pipe in the list
      (left to right) and pipe1 is the other. We can worry about cleanup
      later.
      addc8b02
  34. 26 Mar, 2002 1 commit
  35. 25 Mar, 2002 1 commit
  36. 22 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Add new NS program object. This syntax is different than I had · b9ba3398
      Leigh B. Stoller authored
      originally anticipated, but I was worried about confusion with the
      Agent/Application API that NS provides, and which is substantially
      different than this. Anyway, I added support for this syntax:
      
      	set prog0 [$ns program]
      	$prog0 set node $nodeA
      	$prog0 set command "/bin/ls -lt >& /users/stoller/logs/foo"
      
      Kinda obvious, although whats not obvious is that without events to
      start and stop them, these will never run. So, I added support for
      this:
      
      	$ns at 10 "$prog0 start"
      	$ns at 20 "$prog0 stop"
      
      You can start and stop programs as much as you like, but you cannot
      start a program that is already running; you have to stop it first.
      You can also issue these dynamically using the same api:
      
      	tevc -e testbed/Tevents now prog0 start \
      		"command=/bin/ls -lt / >& /users/stoller/logs/foo"
      	tevc -e testbed/Tevents now prog0 stop
      
      Note the quotes when using a multiword command. I also had intened to
      support a KILL command so that you could send arbitrary signals to a
      process. I added that, but I will not bother to document it yet; since
      I invoke /bin/csh to process the command line, the issue of signals is
      a little fuzzy. Sending a signal like -HUP to the parent process (the
      csh) is not really what we want to do. I think we can support this,
      but I need to poke around and see what the right way is.
      b9ba3398
  37. 20 Mar, 2002 1 commit
  38. 19 Mar, 2002 1 commit