1. 15 Jan, 2003 1 commit
    • Leigh B. Stoller's avatar
      Fixes to how port configuration is done (for trafgens and tunnels, · 76396510
      Leigh B. Stoller authored
      and now sshdport). First off, take the DB out of the loop. There is no
      reason to do DB locking since local nodes are not shared, and even if
      they were, we now allocate port ranges to each experiment when it uses
      virtual nodes (which is the only way to share a node anyway), so there
      is never a case that port allocation between experiments has to be
      coordinated. The only locking that is done is when the range is
      allocated to the experiment, buts that done only once, and only if the
      experiment uses virtual nodes (local or remote).
      
      Also, now that its easy to create lots of jails on a single node, its
      a good idea to give each one their own ssh port. This is recorded in
      the DB nodes table (sshdport) and returned in the jail config from
      tmcd.
      76396510
  2. 13 Jan, 2003 1 commit
  3. 07 Jan, 2003 1 commit
  4. 19 Dec, 2002 1 commit
    • Leigh B. Stoller's avatar
      Two real changes: · 04c20246
      Leigh B. Stoller authored
      1) Add support for local jailed nodes. This support overlaps in a nasty way
         with remote jailed nodes, but I added this for testing purposes, and as
         it turns out its pretty handy. A second pass is needed to unify remote
         and local jails, but for now this is how it goes:
      
        	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 too deeply. So, after assign runs, I use avail to get the
        available vnodes on the assigned pcXX, allocate those for the virtual
        nodes. At present, we still depend on pre-exsiting pcvm nodes for each
        real node.
      
      2) Add code to assign non-overlapping port ranges to each experiment. This
         could be moved to an external script, but is fine right here. There is
         an ipport_ranges table for determining a testbed wide range (currently
         256 ports). This is of course only meaningful when using jailed nodes,
         so do not bother to set a range (and use up the port space) if no jailed
         (virtual) nodes.
      04c20246
  5. 21 Nov, 2002 1 commit
  6. 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
  7. 18 Oct, 2002 1 commit
    • Mac Newbold's avatar
      Merge the newstated branch with the main tree. · 5c961517
      Mac Newbold authored
      Changes to watch out for:
      
      - db calls that change boot info in nodes table are now calls to os_select
      
      - whenever you want to change a node's pxe boot info, or def or next boot
      osids or paths, use os_select.
      
      - when you need to wait for a node to reach some point in the boot process
      (like ISUP), check the state in the database using the lib calls
      
      - Proxydhcp now sends a BOOTING state for each node that it talks to.
      
      - OSs that don't send ISUP will have one generated for them by stated
      either when they ping (if they support ping) or immediately after they get
      to BOOTING.
      
      - States now have timeouts. Actions aren't currently carried out, but they
      will be soon. If you notice problems here, let me know... we're still
      tuning it. (Before all timeouts were set to "none" in the db)
      
      One temporary change:
      
      - While I make our new free node manager daemon (freed), all nodes are
      forced into reloading when they're nfreed and the calls to reset the os
      are disabled (that will move into freed).
      5c961517
  8. 16 Jul, 2002 1 commit
  9. 07 Jul, 2002 1 commit
  10. 30 May, 2002 1 commit
  11. 29 May, 2002 1 commit
  12. 21 May, 2002 1 commit
    • Leigh B. Stoller's avatar
      Rework the previous hack stuff for virtual (multiplex nodes). Now its · 8c08c280
      Leigh B. Stoller authored
      a new hack for remote nodes! All remote node solving is done in the
      new wanassign script. That script deals with both phys (ron) and
      virtual (vrons), as well as fixed nodes of either type. The solution
      is returned to assign_wrapper, which still does the tunnel stuff.
      At some point it would be nice to get general purpose virtual nodes
      (multiplex) working on either local or remote nodes, but thats a ways
      off cause it means too many changes in assign_wrapper, which really
      needs a total rewrite.
      8c08c280
  13. 10 May, 2002 1 commit
  14. 09 May, 2002 4 commits
  15. 08 May, 2002 1 commit
    • Leigh B. Stoller's avatar
      Checkpoint assign_wrapper changes (for virtual nodes). Add new code to · cc0a8796
      Leigh B. Stoller authored
      drop out virt_lans than include virtual nodes, until I get Chad's
      stuff integrated. Drop any pretense of supporting virtual nodes in a
      LAN; just die. Add tunnels table DB upload; tunnels are created
      in place of a vlan when the link includes a virtual node. The tunnel
      info is based on the virt_lans info of course, so that the user gets
      virtual devices with the appropriate IP address. There is some goo for
      determining who is the server and who is the client, and making sure
      that we start just a single server (in case a node has multiple
      tunnels). Also add post pass over virt_trafgens table to make sure
      that port assignments are unique (using new DB table). Oop, need to
      add something to make sure that IP addresses are unique too!
      
      Oh, clear out some obsolete code.
      cc0a8796
  16. 29 Apr, 2002 1 commit
  17. 22 Apr, 2002 1 commit
    • Leigh B. Stoller's avatar
      virtnode hack: Some terribly ugly ones! Do a prepass on the virt_nodes · e002fbeb
      Leigh B. Stoller authored
      and virt_lans to determine which links/lans need to be dropped out of
      the list given to assign (.top file). Basically, if a simple link has
      virtual node in it, get rid of the link (both sides). If a lan has a
      virtual node in it, then get rid of just that member of the lan (the
      other regular members need to be allocated as usual). There is a minor
      problem of a lan with just one physical member left after dropping the
      virtual members; not sure what to do about that so I punted on it for
      now.
      
      Note that I *do* send the virt_nodes into assign for allocation as
      unconnected nodes. Its up to the user to create the routes properly,
      although maybe we have to do that automatically?
      e002fbeb
  18. 11 Apr, 2002 1 commit
  19. 26 Mar, 2002 1 commit
  20. 22 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Add code to the parser to populate a new virt_agents table, which · 2917542a
      Leigh B. Stoller authored
      provides a mapping from an object ($cbr0) to the node on which the
      agent is running ($nodeA). It also includes the type of agent
      (TRAFGEN, LINK, etc). There were a number of reasons for adding this
      table:
      
      * To avoid a series of specialized table lookups in the event
        scheduler to map from a name (link0) to the node on which the agent
        is running. Previously, it was looking the delays table and the
        virt_trafgens table. Well, now it just needs to look at this one
        table and store the mapping internally. When a dynamic event comes
        in, we can figure out where to send it easily.
      
      * For NSE traffic generation. Unlike the simple TG based CBRs, Shashi
        wants to be able to send events to any of the objects in the config
        (udp0, telnet0, ftp0, etc). Well, the virt_trafgens table certainly
        does not store that info, and it would have been painful to work
        this into it. For every agent/application, just add an entry in the
        virt_agents table and the scheduler knows where to send the events.
      
      * It nicely supports the new program object; just plug an entry in the
        virt_agents table.
      
      Okay, there is one messy aspect; delays nodes! Delay nodes are not
      computed until after assign wrapper runs, so in addition to munging
      the static event list in assign_wrapper, we now munge the virt_agents
      table as well. Not much to do about this; delay nodes are handled
      outside the normal path everywhere.
      2917542a
  21. 14 Mar, 2002 1 commit
  22. 11 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Initial version of RED/GRED support. Chris is going to have to finish · f35ce7e3
      Leigh B. Stoller authored
      this off, but here is what I did.
      
      Parser: Allow for the following syntax
      
      	set link0  [$ns duplex-link $nodeA $nodeB 100Mb 0ms RED]
      	set queue0 [[$ns link $nodeA $nodeB] queue]
      	$queue0 set gentle_ 1
      	$queue0 set queue-in-bytes_ 0
      	$queue0 set limit_ 50
      	$queue0 set maxthresh_ 20
      	$queue0 set thresh_ 7
      	$queue0 set linterm_ 11
      	$queue0 set q_weight_ 0.004
      
          NB: This differs from the NS syntax (and is the part that Chris
          needs to fix) in that there is just a single queue object per
          duplex link, thus the parameters cannot be set asymmetrically.
          Note, the delay node *does* use a RED/GRED queue in each
          direction, but its params are the same. These TCL hacks took a
          long time for me to get right!
      
          Also note that I have no idea how this stuff relates to LANS! I
          do not allow LANS to be created with RED queues (another item for
          Chris to work on perhaps?).
      
      assign_wrapper: A horrible hack to pass the new fields added to
      virt_lans onto the delays table setup. Also another minor hack ensure
      that a delay node is added when a RED queue is used (for the case when
      no other traffic shaping is done). At the moment, the virt_lans table
      has a single set of fields, while the delays table has the double set;
      one for each direction of the pipe. Here is a listing.
      
          alter table delays add q0_limit int default 0 after lossrate0;
          alter table delays add q0_maxthresh int default 0 after q0_limit;
          alter table delays add q0_minthresh int default 0 after q0_maxthresh;
          alter table delays add q0_weight float default 0.0 after q0_minthresh;
          alter table delays add q0_linterm int default 0 after q0_weight;
          alter table delays add q0_qinbytes tinyint default 0 after q0_linterm;
          alter table delays add q0_bytes tinyint default 0 after q0_qinbytes;
          alter table delays add q0_meanpsize int default 0 after q0_bytes;
          alter table delays add q0_wait int default 0 after q0_meanpsize;
          alter table delays add q0_setbit int default 0 after q0_wait;
          alter table delays add q0_droptail int default 0 after q0_setbit;
          alter table delays add q0_red tinyint default 0 after q0_droptail;
          alter table delays add q0_gentle tinyint default 0 after q0_red;
      
      tmcd/tmcd.c: Change dodelays to pass back all of these fields (for
      both pipes; there are equiv q1 fields in the delays table). Yikes! Its
      done in a backwards compatable manner though, so existing delay nodes
      will continue to work just fine.
      
      tmcd/freebsd/liblocsetup.pm: Change the delays configuration script to
      get all these fields and do something useful with. Of course, our
      delay nodes cannot use a lot of these fields, but the information is
      sent through for the eventuality that we have more sophisticated
      delays nodes.
      
      Test Suite: Add red test dir that has the above syntax as its test.
      f35ce7e3
  23. 05 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      A wide ranging set of event system changes: · 0318cc22
      Leigh B. Stoller authored
      assign_wrapper.in: Hack in a change that ensures a delay node is
      created for any link on which an event is posted (up,down,modify),
      no matter what its initial parameters are. ie: If a link is created
      with no delay, but there is an event that adds a delay later, then we
      must drop in a delay node. Same for up/down on a link. We do this in
      the delay node. I am reasonably confident that this change is fine for
      duplex links, but I am less sure of the effect on lans!
      
      eventsys_control.in: Checkpoint latest changes. Add "replay" option,
      which right now just stops and starts the event scheduler so that it
      reloads the entire event list. Add check for existing experiment, and
      that the experiment is either active or swapping (do not want to start
      a scheduler for a swapped out experiment!). Add check to see if there
      are any events, and skip startup if there are not events in the DB.
      Lastly, get very serious about preventing more than one scheduler from
      being started, either by accident or intentionally. My protocol is to
      lock the table, grab and set the pid to -pid, test the pid for a
      positive value, and if positive, send the scheduler a kill(TERM) so
      that it can cleanup, clear the pid to zero in the DB, and exit. This
      approach ensures that we do not try to send a kill to a pid that is no
      longer active or owned by the user (this last part is not really
      necessary cause of how pids are reused, but it was easy to add so why
      not).
      
      exports_setup.in: Trivial change to make it easier to turn this on
      temporarily in devel trees.
      named_setup.in: Ditto.
      
      node_reboot.in: Add call to TBdbfork() in child cause of apparent DB
      connection problems across forks. In the child, set the eventstatus
      for the node to REBOOT if successful (not this event status stuff is
      temporary, will be recast in next set of revisions).
      
      GNUmakefile:  Add new controlling program, eventsys_control.
      power.in:     Ditto previous comment about REBOOT.
      os_setup.in:  Non event system cleanups.
      tbend.in:     Add DB cleanup of the new virt_trafgens and eventlist tables.
      tbprerun.in:  Ditto.
      tbreport.in:  Print out the event list in a pretty print format.
      tbswapin.in:  Add call to start the event system. Also a big fix; move
                    the named script up above the os_setup so that the named
                    tables have been updated by the time the first node
                    reboots. I noticed that nodes were failing on gethostbyname().
      tbswapout.in: Add call to stop the event system.
      0318cc22
  24. 08 Feb, 2002 1 commit
    • Leigh B. Stoller's avatar
      Big round of image/osid changes. This is the first cut (final cut?) at · a73e627e
      Leigh B. Stoller authored
      supporting autocreating and autoloading images. The imageid form now
      sports a field to specify a nodeid to create the image from; If set,
      the backend create_image script is invoked. Thats the easy part.
      Slightly harder is autoloading images based on the osid specified in
      the NS file. To support this, I have added a new DB table called
      osidtoimageid, which holds the mapping from osid/pctype to imageid.
      When users create images, they must specify what node types that image
      is good for. Obviously, the mappings have to be unique or it would be
      impossible to figure it out! Anyway, once that image mapping is
      in place and the image created, the user can specify that ID in the NS
      file. I've changed os_setup to to look for IDs that are not loaded,
      and to try and find one in the osidtoimageid. If found, it invokes
      os_load. To keep things running in parallel as much as possible,
      os_setup issues all the loads/reboots (could be more than a single set
      of loads is multiple IDs are in the NS file) at once, and waits for
      all the children to exit. I've hacked up os_load a bit to try and be
      more robust in the face of PXE failures, which still happen and are
      rather troublsesome. Need an event system!
      
      Contained in this revision are unrelated changed to make the OS and
      Image IDs per-project unique instead of globally unique, since thats a
      pain for the users. This turns out to be very messy, since underneath
      we do not want to pass around pid/ID in all the various places its
      used. Rather, I create a globally unique name and extened the OS and
      Image tables to include pid/name/ID. The user selects pid/name, and I
      create the globally unique ID. For the most part this is invisible
      throughout the system, except where we interface with the user, say in
      the web pages; the user should see his chosen name where possible, and
      the should invoke scripts (os_load, create_image, etc) using his/her
      name not the internal ID. Also, in the front end the NS file should
      use the user name not the ID. All in all, this accounted for a number
      of annoying changes and some special cases that are unavoidable.
      a73e627e
  25. 14 Jan, 2002 2 commits
  26. 11 Jan, 2002 1 commit
  27. 08 Jan, 2002 1 commit
  28. 07 Jan, 2002 1 commit
  29. 03 Jan, 2002 1 commit
  30. 13 Dec, 2001 1 commit
  31. 07 Dec, 2001 1 commit
  32. 05 Dec, 2001 1 commit
    • Leigh B. Stoller's avatar
      Minor changes to convert delays from ints to floats in the DB. Chris · cab46455
      Leigh B. Stoller authored
      did the lanlink change. assign_wrapper does not really need any
      changes at all, but I dropped a comment in. The only real change is
      needed in the client side to convert a floating point from tmcd, into
      an int to give to ipfw. Rather cheesy too, given that Perl does not
      have a real conversion function (int() truncates).
      cab46455
  33. 03 Dec, 2001 1 commit
  34. 29 Nov, 2001 1 commit
  35. 28 Nov, 2001 1 commit
  36. 27 Nov, 2001 1 commit