1. 23 Jun, 2004 1 commit
    • Leigh B. Stoller's avatar
      Switch to "dynamic" creation of certain virtual nodes (jail/pcvm and · 4d5620c2
      Leigh B. Stoller authored
      vserver/pcplab). Rather then 10000s of fixed node entries in the DB,
      create node entries on the fly as needed (assign_wrapper), and then
      delete them when they are no longer used (nfree). When new nodes check
      in, no longer create all those nodes table entries (utils/newnode.in
      and tbsetup/plab/libplab.py.in).
      
      I've added a new library: db/Node.pm which is something I started a
      while back, and decided to commit, along with the support for creating
      and deleting virtual nodes. CreateVnodes() creates a new set of nodes,
      choosing non-conflicting names in the DB, and then immediately
      reserves them to the pid/eid specified. DeleteVnodes takes a list of
      vnodes and deletes them from nodes,reserved,etc. This library does a
      few other things which I am going to be playing with, so you might
      want to go read the comment at the top of the file. Feel free to speak
      up. CreateVnodes() is from called assign_wrapper when a node type has
      the "isdynamic" property. Otherwise does the existing avail/nalloc
      stuff. DeleteVnodes() is called from nfree when the node type has the
      isdynamic property.
      
      I've added a script (sql/delvnodes.pl) to run after updating the DB
      and software. All free pcvm and pcplab virtual nodes are deleted from
      the DB; reserved ones will get deleted whenever their experiment ends.
      I've noted all of this in doc/UPDATING, including setting the
      isdynamic property on pcvm in the node_types table.
      
      I've left tbsetup/plab/libplab.py.in to create a single pcplab node
      for the management sliver (still called -20). We can worry about this
      later.
      
      All this for modelnet?
      4d5620c2
  2. 17 Jun, 2004 1 commit
  3. 10 Jun, 2004 1 commit
  4. 03 Jun, 2004 2 commits
  5. 01 Jun, 2004 1 commit
  6. 21 May, 2004 1 commit
  7. 20 May, 2004 1 commit
  8. 16 May, 2004 1 commit
  9. 13 May, 2004 1 commit
  10. 12 May, 2004 1 commit
  11. 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
  12. 05 May, 2004 1 commit
    • Leigh B. Stoller's avatar
      Cleanup of how the virt_agents table is seeded; Used to be that an · 07d249ca
      Leigh B. Stoller authored
      agent was created for each link,link-vnode in a link/lan only when
      that link has a delay/linkdelay. Well, with the link-agent that will
      be used on wireless lans, lets just stick those agents into the table
      for all links/lans in the experiment; its harmless. Might revisit this
      at some point.
      07d249ca
  13. 28 Apr, 2004 2 commits
  14. 26 Apr, 2004 2 commits
    • Robert Ricci's avatar
      Some big changes to assign, and some related changes to assign_wrapper · 238dce73
      Robert Ricci authored
      and ptopgen.
      
      Add link typing to assign. Each virtual link is given a single type.
      Each physical link is given one or more types. A virtual link will
      only be mapped to a physical link which can satisfy its type. In both
      the top and ptop files, the link types are now mandatory, and they
      fall at the end of the mandatory link arguments.
      
      This differers from the 'regular' type system in two ways. First, a
      plink is not constrained to filling only one type at a time. If we are
      using emulated links, a plink could satisfy, say, an 'ethernet' link
      and an 'fxp' link at the same time. This seems to more naturally match
      the way we'll use link types.  Second, there are no counts assoicated
      with link types, as there are for node types. ie. a link is not an
      'ethernet:1' link, it's an 'ethernet' link. Presumably, when
      multiplexing virtual links onto a physical one, it's bandwidth that's
      the factor that limits the multiplexing.
      
      The link type is now taken into account when constructing pclasses,
      and in the mapping precheck.
      
      As a side-effect of these changes, the silly 'count' argument on the
      end of link lines in the ptop file, which was used for the fake LAN
      nodes, is no longer supported.
      
      The implementation could be a bit more efficient, but that would mean
      tossing more of the stuff we do with boost's graph library. I think
      this should happen, but today is not the day.
      
      Modify assign_wrapper and ptopgen to spit out top and ptop files in
      the new format.
      
      Changed the constant LINK_UKNOWN to LINK_UNMAPPED - the new name more
      accurately reflects the way this constant is used.
      
      Add a new '-n' flag that tells assign not to do annealing, just exit
      after the type precheck.
      
      Clarify the usage message for the -c flag.
      
      Removed some dead code for dealing with LAN nodes.
      238dce73
    • Leigh B. Stoller's avatar
      Changes to exit status stuff to reflect recent changes by Rob to how · 1c4a613c
      Leigh B. Stoller authored
      assign exits (exit codes).
      
      * in assign_wrapper, no longer return any status from assign to the
        caller. This was pointless. Instead, return 0 on success, 1 on
        controlled error, and -1 on uncontrolled error (die() called
        someplace). Add in CANRECOVER bit whenever the wrapper exits, even
        if uncontrolled, by putting in an END block to catch the die. This
        should prevent certain cases where a swapmod error would be flagged
        as not recoverable.
      
      * Remove most of the assign output processing since we no longer
        return its codes. Still print a portion of it to the log though.
      
      * Change call to fatal() in assign_wrapper; do not pass an exitcode
        since in every case it was the same damn thing!
      
      * Change tbswap to no longer carry assign_wrapper exit code to its
        exit.
      
      * Change the batch daemon to treat all errors as continuable (keep
        batch queued) unless exit code is -1. We will need to revisit this a
        bit perhaps, when Rob adds precheck code.
      1c4a613c
  15. 15 Apr, 2004 1 commit
  16. 12 Apr, 2004 2 commits
    • Leigh B. Stoller's avatar
    • 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
  17. 08 Mar, 2004 1 commit
    • Robert Ricci's avatar
      Make the getbandwidth() function aware of node types - it takes as a · 5cb2e92f
      Robert Ricci authored
      parameter the virtual node it is being called for, and considers only
      bandwidths that can be supported by physical nodes that virtual node
      can be mapped to.
      
      This fixes some cases where we were mistakenly setting interfaces
      on slow links to 10Mbps, which does not work reliably.
      
      Not surpisingly, tracking down problems with vtypes was half the
      trouble with making this change.
      5cb2e92f
  18. 23 Feb, 2004 1 commit
  19. 16 Feb, 2004 1 commit
  20. 12 Feb, 2004 2 commits
    • Leigh B. Stoller's avatar
      Fix problem with trivial links not getting lindelays. In the case that · 0dc661b1
      Leigh B. Stoller authored
      a 100Mb link is mapped to a trivial link, a linkdelay has to be
      inserted since the actual loopback bandwidth is much higher. The
      problem is that unlike other delays where requires_delay() will return
      true, this decision has to wait until after assign does the mapping
      and we find out that a link was mapped to a trivial link. When this
      happens, I insert a linkdelay "on the fly" when processing the link
      statements from assign.
      0dc661b1
    • Robert Ricci's avatar
      Unbreak vtypes by putting entries for them into the %node_type_linkbw · fa4f5764
      Robert Ricci authored
      hash.
      
      This means we have to call LoadVirtTypes() from a slightly different
      place, so that we have the virt types before calling LoadPhysInfo(),
      where %node_type_linkbw is built.
      fa4f5764
  21. 10 Feb, 2004 1 commit
  22. 03 Feb, 2004 3 commits
  23. 30 Jan, 2004 2 commits
  24. 29 Jan, 2004 1 commit
    • Shashi Guruprasad's avatar
      Fixes the bug unearthed by Tim. When a link is created between a jail · 8e236ecc
      Shashi Guruprasad authored
      vnode and a PC node, under normal circumstances, a real physical link
      is used. However, a user can use tb-set-multiplexed on the link that
      allows assign to map multiple vlinks over the same physical link.
      This is fine when the PC is running FBSD-STD which can use veth
      interfaces. Not so if it is running Linux or a non-standard BSD.
      This fix forces EMULATED links and VETH devices when the PC is running
      FBSD-STD and turns those attributes off otherwise so that assign
      will not give a mapping that cannot be realized on the client side.
      For the gory details of this problem, look at testbed-ops email thread
      "pcvm route problem" dated 29th Jan 2004.
      
      A problem still exists in the non-BSD router + jail vnodes in a delayed
      LAN. VLANs table is not getting the correct entries. A fix will come
      soon. Follow the testbed-ops email thread "fix for the pcvm route problem"
      dated 29th Jan 2004 for the gory details.
      8e236ecc
  25. 21 Jan, 2004 1 commit
  26. 12 Jan, 2004 1 commit
  27. 09 Jan, 2004 1 commit
    • Shashi Guruprasad's avatar
      Changes to do auto re-swap of expts with simnodes when an nse on a simhost · 375f87c1
      Shashi Guruprasad authored
      (or more than one simhost) is unable to keep up with real-time. It includes
      changes to assign_wrapper to handle swap modify for simnodes, the simple
      algorithm in nseswap that bumps up the nodeweight of simnodes being hosted
      on a simhost that reports "can't keep up with real-time" (aka nse violation),
      ptopgen and sim.tcl to prefer nodes that already have the FBSD-NSE image.
      Also, changes to other files to send out NSESWAP event.
      
      One unrelated change: We now have per-swapin .top files and assign.log
      files along with .ptop files. This helps in debugging across multiple
      swapins since files remain in the form of
      <pid>-<eid>-<process_id>.{top,ptop} and assign-<pid>-<eid>-<process_id>.log
      Also useful for archiving.
      375f87c1
  28. 06 Jan, 2004 1 commit
    • Robert Ricci's avatar
      Fix dynamic pclasses, and make them the default for virtual nodes · c7e2d29e
      Robert Ricci authored
      again.
      
      One of the fixes changes the way in which we iterate through pclasses
      in find_pnode(). We used to treat the vector like a ring buffer, and
      start (randomly) someplace in the middle. This turns out to give some
      bad statistical properties when doing dynamic pclasses, since long
      chains of disabled pclasses will cause some pclasses to be selected
      more often. My old hack of just hopping around randomly in the
      disabled-pclass case was bad, because it's hard to tell when you've
      actually tried all the pclasses - so, we were getting false negatives
      where it was looking like there was no place available where we could
      map a vnode, which turned out to have worse effects than I had
      thought.
      
      So, now, we make a list of all the indices and randomize the order,
      then just iterate through that list.
      
      We also now count the number of pclasses that are enabled at every
      temperature step, and adjust the neighborhood size to remove them.
      This makes dynamic pclasses quite a bit faster - it cuts the time
      by 30% - 50% for my test case.
      
      Cleaned up find_pnode() by removing some #ifdef's that we don't use,
      and probably will never want to again - this makes the function almost
      readable!
      c7e2d29e
  29. 03 Jan, 2004 2 commits
  30. 23 Dec, 2003 1 commit
    • Leigh B. Stoller's avatar
      Add new state PXEWAIT to be explained later ... · 22ee2594
      Leigh B. Stoller authored
      Change ptopgen to look at the eventstate of a node; a node is not considered
      free unless it is ISUP or PXEWAIT.
      
      Add TBAvailablePCs() to libdb, removing the corresponding code from
      assign_wrapper. This routine does the equiv of ptopgen, returning the
      number of PCs that are available for use (looking at eventstate).
      
      Change TBFreePCs in the web interface accordingly.
      
      The above changes correspond to an upcoming change in stated.
      22ee2594
  31. 15 Dec, 2003 1 commit
    • Shashi Guruprasad's avatar
      Distributed NSE changes. In other words, simulation resources are · d266bd71
      Shashi Guruprasad authored
      now mapped to more than one PC if required. The simnode_capacity
      column in the node_types table determines how many sim nodes can
      be packed on one PC. The packing factor can also be controlled via
      tb-set-colocate-factor to be smaller than simnode_capacity.
      
      - No frontend code changes. To summarize:
        $ns make-simulated {
          ...
        }
        is still the easy way to put a whole bunch of Tcl code to be
        in simulation.
        One unrelated fix in the frontend code is to fix the
        xmlencode() function which prior to this would knock off
        newlines from columns in the XML output. This affected
        nseconfigs since it is one of the few columns with embedded
        newlines. Also changed the event type and event object type
        in traffic.tcl from TRAFGEN/MODIFY to NSE/NSEEVENT.
      
      - More Tcl code in a new directory tbsetup/nseparse
        -> Runs on ops similar to the main parser. This is invoked
           from assign_wrapper in the end if there are simnodes
        -> Partitions the Tcl code into multiple Tcl specifications
           and updates the nseconfigs table via xmlconvert
        -> Comes with a lot of caveats. Arbitrary Tcl code such as user
           specified objects or procedures will not be re-generated. For
           example, if a user wanted a procedure to be included in Tcl
           code for all partitions, there is no way for code in nseparse
           to do that. Besides that, it needs to be tested more thoroughly.
      
      - xmlconvert has a new option -s. When invoked with this option,
        the experiments table is not allowed to be modified. Also,
        virtual tables are just updated (as opposed to deleting
        all rows in the first invocation before inserting new rows)
      
      - nse.patch has all the IP address related changes committed in
        iversion 1.11 + 2 other changes. 1) MTU discovery support in
        the ICMP agent 2) "$ns rlink" mechanism for sim node to real
        node links
      
      - nseinput.tcl includes several client side changes to add IP
        routes in NSE and the kernel routing table for packets crossing
        pnodes. Also made the parsing of tmcc command output more robust
        to new changes. Other client side changes in libsetup.pm and other
        scripts to run nse, are also in this commit
      
      - Besides the expected changes in assign_wrapper for simulated nodes,
        the interfaces and veth_interfaces tables are updated with
        routing table identifiers (rtabid). The tmcd changes are already
        committed. This field is used only by sim hosts on the client side.
        Of course, they can be used by jails as well if desired.
      d266bd71