1. 26 Oct, 2004 1 commit
    • Leigh Stoller's avatar
      Pump up dhcpd_makeconf ... · 29b8c214
      Leigh Stoller authored
      * Add -i option to install the new dhcpd file into place, backing up
        the old version. Does not restart dhcpd though; that is left to
        someone else at the moment. May change later. Without -i, works as
        before, writing the new config file to stdout. Of course, must use
        the standard locking protocol to serialize when using -i, lest we
        end up with a garbled dhcpd.conf file.
      
      * Add -t option to specify the template file. Changed default
        behaviour so that without any args, uses the template file in
        /usr/local/etc. Together with -i option, this moves the two
        hardwired paths to a single place (script).
      
      * Changed how utiils/newnode script calls dhcpd_makeconf (call with
        just -i option to let dhcpd_makeconf handle all that icky stuff).
      
      * Changed how install/boss-install script calls dhcpd_makeconf (call with
        just -i option to let dhcpd_makeconf handle all that icky stuff).
      
      * Also change boss-install to use install target in dhcpd directory,
        to install the template file.
      29b8c214
  2. 25 Oct, 2004 2 commits
  3. 11 Oct, 2004 5 commits
  4. 08 Oct, 2004 1 commit
  5. 30 Sep, 2004 1 commit
  6. 29 Sep, 2004 1 commit
  7. 17 Sep, 2004 1 commit
  8. 08 Sep, 2004 1 commit
    • Mike Hibler's avatar
      1.275: Add timed-based mapping table for generic OSIDs. This augments the · bb56a192
      Mike Hibler authored
             nextosid mechinism of 1.114 making it possible to map a generic *-STD
             OSID based on the time in which an experiment is created.  This
             provides backward compatibility for old experiments when the standard
             images are changed.
      
             The osid_map table lookup is triggered when the value of the nextosid
             field is set to 'MAP:osid_map'.  The nextosid also continues to behave
             as before: if it contains a valid osid, that OSID value is used to map
             independent of the experiment creation time.  The two styles can also
             be mixed, for example FBSD-JAIL has a nextosid of FBSD-STD which in
             turn is looked up and redirects to the osid_map and selects one of
             FBSD47-STD or FBSD410-STD depending on the time.
      
      	CREATE TABLE osid_map (
      	  osid varchar(35) NOT NULL default '',
      	  btime datetime NOT NULL default '1000-01-01 00:00:00',
      	  etime datetime NOT NULL default '9999-12-31 23:59:59',
      	  nextosid varchar(35) default NULL,
      	  PRIMARY KEY  (osid,btime,etime)
      	) TYPE=MyISAM;
      
             Yeah, yeah, I'm using another magic date as a sentinel value.
             Tell ya what, in 7995 years, find out where I'm buried, dig me up,
             and kick my ass for being so short-sighted...
      
             The following commands are not strictly needed, they just give
             an example, default population of the table.  They cause the standard
             images to be revectored through the table and then remapped, based on
             two time ranges, to the exact same image.  Obviously, the second set
             would normally be mapped to a different set of images (say RHL90 and
             FBSD410):
      
      	INSERT INTO osid_map (osid,etime,nextosid) VALUES \
      	  ('RHL-STD','2004-09-08 08:59:59','emulab-ops-RHL73-STD');
      	INSERT INTO osid_map (osid,etime,nextosid) VALUES \
      	  ('FBSD-STD','2004-09-08 08:59:59','emulab-ops-FBSD47-STD');
      
      	INSERT INTO osid_map (osid,btime,nextosid) VALUES \
      	  ('RHL-STD','2004-09-08 09:00:00','emulab-ops-RHL73-STD');
      	INSERT INTO osid_map (osid,btime,nextosid) VALUES \
      	  ('FBSD-STD','2004-09-08 09:00:00','emulab-ops-FBSD47-STD');
      
      	UPDATE os_info SET nextosid='MAP:osid_map' \
      	  WHERE osname IN ('RHL-STD','FBSD-STD');
      bb56a192
  9. 27 Aug, 2004 1 commit
  10. 25 Aug, 2004 1 commit
  11. 18 Aug, 2004 2 commits
    • Christopher Alfeld's avatar
      Fix for ALWAYSUP nodes and fix for switches with interface entries. · a7b4249d
      Christopher Alfeld authored
      In detail:
      
      1. Added TBDB_NODESTATE_ALWAYSUP to libdb.pm for representing the ALWAYSUP
      eventstate.
      
      2. Modified free node calculation in ptopgen to include ALWAYSUP nodes.
      
      3. Added code to ptopgen to correctly handle the case of a NULL iface
      column, which happens when switches have interface (as they do in
      Wisconsin), but assign_wrapper expects (null) for their iface rather than
      "".
      a7b4249d
    • Robert Ricci's avatar
      New script, deletenode. Does what it sounds like. Scrubs tables · 6c685f91
      Robert Ricci authored
      of all references to a node. Mainly intended for when you have a
      mishap with the newnode stuff and need to clean it up.
      
      Added a big list of which tables contain information about physical
      nodes to libdb, so that this and other scripts can find it all.
      6c685f91
  12. 16 Aug, 2004 3 commits
  13. 11 Aug, 2004 2 commits
    • Leigh Stoller's avatar
      Add new per-lan table, which currently is just for Mike: · d09d9696
      Leigh Stoller authored
      1.269: Add new table to generate a per virt_lan index for use with
             veth vlan tags. This would be so much easier if the virt_lans
             table had been split into virt_lans and virt_lan_members.
             Anyway, this table might someday become the per-lan table, with a
             table of member settings. This would reduce the incredible amount of
             duplicate info in virt_lans!
      
      	CREATE TABLE virt_lan_lans (
      	  pid varchar(12) NOT NULL default '',
      	  eid varchar(32) NOT NULL default '',
      	  idx int(11) NOT NULL auto_increment,
      	  vname varchar(32) NOT NULL default '',
      	  PRIMARY KEY  (pid,eid,idx),
      	  UNIQUE KEY vname (pid,eid,vname)
      	) TYPE=MyISAM;
      
             This arrangement will provide a unique index per virt_lan, within
             each pid,eid. That is, it starts from 1 for each pid,eid. That is
             necessary since the limit is 16 bits, so a global index would
             quickly overflow. The above table is populated with:
      
      	insert into virt_lan_lans (pid, eid, vname)
                  select distinct pid,eid,vname from virt_lans;
      d09d9696
    • Leigh Stoller's avatar
      c898da51
  14. 10 Aug, 2004 1 commit
  15. 09 Aug, 2004 2 commits
    • Leigh Stoller's avatar
      Some cleanups and performance improvements: · f604dc33
      Leigh Stoller authored
      * Be more selective about what lists are regenerated; we were generating
        way too many lists each time called. When calling from tbswap, use new
        -t option to generate just the active lists. When called from setgroups,
        use -p option to generate lists just for the project. Add update option
        for when user changes email address (and all lists really do need to be
        regenerated).
      
      * Add "diff" processing. Instead of blindly firing each new list over to
        ops with ssh, store a copy of all of the lists in
        /usr/testbed/lists. After we generate the new list, diff it against the
        stored copy. If the same, skip it. Otherwise stash new copy and fire it
        over. This should reduce the wait times by quite a bit since the lists
        rarely change (except for the activity lists of course).
      
      * Add -n (impotent) option for debugging; skips the ssh over to ops.
      
      * Reorg a lot of stuff; it was getting hard to follow.
      f604dc33
    • Leigh Stoller's avatar
      Remove node_list script; we give that to the user via an XMLRPC call. · 38f90bb3
      Leigh Stoller authored
      Remove all symlinks of plasticwrap; this has been replaced by the XMLRPC
      server.
      38f90bb3
  16. 29 Jul, 2004 6 commits
    • Leigh Stoller's avatar
    • Leigh Stoller's avatar
      Rework TBGetSiteVar() slightly. Add optional second parameter $rptr to · 03403a55
      Leigh Stoller authored
      store the result in. When called this new way, the value goes into
      $rptr, and exit status is returned to caller instead. In addition,
      when called this way, all errors are non-fatal; it is up to the caller
      to decide what to do.
      03403a55
    • Leigh Stoller's avatar
      Two unrelated bug fixes (with some related cleanups and tweaks) · 9f4edbba
      Leigh Stoller authored
      * The first involves swapmod. When a swapmod on an active experiment fails,
        tbswap will reswap the experiment back to the original configuration. The
        problem is that it is reswapping it with the *new* virtual state of the
        experiment in the DB. It is not until later when control returns to
        swapexp that the virtual state is restored. This is plainly wrong, and in
        fact was causing the event scheduler grief cause it was starting up,
        reading the the virtual topo, which was different, wrong, and about to be
        blown away.
      
        I reorganized the modify section of swapexp so that virtual state is
        restored only when its a swapmod on a swapped experiment. On an active
        experiment, I moved that code down into tbswap, which will now does all
        of the virtual and physical state retore before it does the reswap back
        to the original experiment. Just for kicks, its also done if tbswap
        decides to swap the experiment cause of a fatal error.
      
        Cleanups: I changed $NoRecover to $CanRecover. My feeble brain cannot
        deal with !$NoRecover. I know, two knots make a wright for most people.
      
        Renderer: I was annoyed by the fact that we rerun the renderer on a
        failed swapmod. The original reason is that the renderer runs in the
        background and so vis_nodes cannot be saved with the rest of the virtual
        state tables cause the renderer might still be running when the user
        fires off the swapmod. Well, the hell with that. We lock the vis_nodes
        table anyway in the renderer during update, so we are certain to get a
        consistent snapshot. We store the renderer pid in the experiments table,
        so if the renderer was running, just fire off another one; mostly this is
        not going to happen. In addition, tbprerun no longer starts a new
        renderer when doing the swapmod; I start the new renderer later after
        swapmod succeeds. I might end up tweaking this a bit depending on what
        people notice as being different.
      
      * Termination changes to batchexp and swapexp: I've rearranged the
        termination code using an END block so that any uncontrolled exit from
        either batchexp or swapexp will go through the cleanup code, and
        hopefully insert a stats record, as well as not leave the experiment in
        some inbetween state. I've set the max DB retry count to zero in both
        cases, which means infinite retry. I've also added SIGTERM handlers to
        both so that again, we can kill a hung batch/swap and have it clean up
        things more or less. Note that END blocks are not caught when a signal
        causes the program to die; you have to catch it and then die() so that
        the END block is executed.
      
        Eventually, we need to clean up the various libraries so that we do not
        use DBQueryFatal(), but rather use DBQueryWarn(), and look for failure.
        Ditto for event system interface.
      9f4edbba
    • Mike Hibler's avatar
      Make sure we don't produce vnode IP addresses with leading zeros in the octets. · d8e85f02
      Mike Hibler authored
      This is apparently a no-no and was happening at DETER.
      d8e85f02
    • Leigh Stoller's avatar
    • Leigh Stoller's avatar
  17. 19 Jul, 2004 2 commits
    • Leigh Stoller's avatar
      If no matching rows, return () instead of None so that it looks like · a7f6662e
      Leigh Stoller authored
      a query that succeeded but did not return any matches.
      a7f6662e
    • Kirk Webb's avatar
      · 03921d0e
      Kirk Webb authored
      A bunch of plab interface updates that I've worked on over the last while.
      Most significant is the revamped renewal code that tries to push the leases
      out to the policy defined maximum of two months during each iteration through
      the plabrenewd daemon loop.
      
      - added python lib code to get SiteVars
      - Fixed up comments to reflect current code operation
      - revamped renewal code (again)
        - changed all times to UTC for consistency
        - removed node-level renew invocation in favor of slice-level
          - if backend module requires node-level renewals, it must handle them
            itself in the slice-level function
          - better reporting
      - set admin bit if creating svc slice
        - other updates to ensure admin bit is preserved
      - update rootball handling function naming
      - updated tryXmlRpcCmd() to accept two new sets of strings, and a callback
        function.  The strings represent Faults that either 1) indicate success,
        or 2) indicate failure.  The callback is another optional error handling
        method, allowing the caller to decide how to treat individual faults as
        they see fit.
      - updated the backend module code to take advantage of the new string
        match status identifiers in tryXmlRpcCmd()
      - completely revamped slice renewal code in mod_PLC backend
        - compare against real lease expiration data gathered direct from PLC
        We used to just infer from our originally requested lease length
        - warn when our notion of expiration doesn't match PLC's
      - added agent caching and lease expiration info caching to mod_PLC
        backend.
      03921d0e
  18. 15 Jul, 2004 2 commits
    • Leigh Stoller's avatar
      Couple of minor tweaks to make sure that experiment state events · d1a35ea9
      Leigh Stoller authored
      get sent properly; need to call TBdbfork(), and add a couple more
      event sends in libdb.
      d1a35ea9
    • Leigh Stoller's avatar
      Overview: Add Event Groups: · ed964507
      Leigh Stoller authored
      	set g1 [new EventGroup $ns]
      	$g1 add  $link0 $link1
      	$ns at 60.0 "$g1 down"
      
      See the new advanced tutorial section on event groups for a better
      example.
      
      Changed tbreport to dump the event groups table when in summary mode.
      At the same time, I changed tbreport to use the recently added
      virt_lans:vnode and ip slots, decprecating virt_nodes:ips in one more
      place. I also changed the web interface to always dump the event and
      event group summaries.
      
      The parser gets a new file (event.tcl), and the "at" method deals with
      event group events by expanding them inline into individual events
      sent to each member. For some agents, this is unavoidable; traffic
      generators get the initial params in the event, so it is not possible
      to send a single event to all members of the group. Same goes for
      program objects, although program objects do default to the initial
      command now, at least on new images.
      
      Changed the event scheduler to load the event groups table. The
      current operation is that the scheduler expands events sent to a
      group, into a set of distinct events sent to each member of the
      group. At some point we proably want to optimize this by telling the
      agents (running on the nodes) what groups they are members of.
      
      Other News: Added a "mustdelay" slot to the virt_lans table so the
      parser can tell assign_wrapper that a link needs to be delayed, say if
      there are events or if the link is red/gred. Previously,
      assign_wrapper tried to figure this out by looking at the event list,
      etc. I have removed that code; see database-migrate for instructions
      on how to initialize this slot in existing experiments. assign_wrapper
      is free to ignore or insert delays anyway, but having the parser do
      this makes more sense.
      
      I also made some "rename" changes to the parser wrt queues and lans
      and links. Not really necessary, but I got sidetracked (for several
      hours!) trying to understand that rename stuff a little better, and
      now I do.
      ed964507
  19. 12 Jul, 2004 2 commits
  20. 07 Jul, 2004 3 commits