1. 10 Apr, 2006 1 commit
  2. 09 Apr, 2006 1 commit
    • Leigh Stoller's avatar
      Add the following two tables to the duplicate DB that we keep on ops · 4cc95276
      Leigh Stoller authored
      for ongoing error work:
      
       	CREATE TABLE users (
       	  uid varchar(8) NOT NULL default '',
       	  unix_uid smallint(5) unsigned NOT NULL default '0',
       	  PRIMARY KEY  (uid),
       	  KEY unix_uid (unix_uid)
       	) TYPE=MyISAM;
      
       	CREATE TABLE experiments (
       	  idx int(10) unsigned NOT NULL default 0,
       	  pid varchar(12) NOT NULL default '',
       	  eid varchar(32) NOT NULL default '',
       	  PRIMARY KEY idx (idx),
       	  KEY  (eid,pid)
       	) TYPE=MyISAM;
      4cc95276
  3. 07 Apr, 2006 1 commit
  4. 30 Mar, 2006 1 commit
  5. 29 Mar, 2006 1 commit
    • Mike Hibler's avatar
      Ressurect the nodes table pxe_boot_path column to allow specifying · dce80595
      Mike Hibler authored
      an alternate "filename" for the dhcpd.conf file.  "Inner plabs" are likely
      to need this (to boot pxelinux for emulating the plab boot CD).
      
      dhcpd_makeconf picks up the DB field and sets the filename field accordingly.
      
      nfree will invoke dhcpd_makeconf if any node being freed has a non-NULL
      pxe_boot_path value, in order to reset it.
      dce80595
  6. 28 Mar, 2006 1 commit
  7. 23 Mar, 2006 1 commit
  8. 21 Mar, 2006 2 commits
    • Kevin Atkinson's avatar
      · d258dde6
      Kevin Atkinson authored
      Changed format of email sent to user on errors.  The error will now
      appear instead of the generic message when I am confident it is
      accurate.  The subject line will also change to reflect the cause of
      an error.
      
      Avoid sending mail to testbed-ops during failed swap related evenets
      in some cases.  It will instead be sent to a new mailing list
      testbed-errors.
      
      Added a new row in the experiment info table "Last Error:" which
      states the cause of the error, and links to a new page displaying the
      error.
      
      Made some assign/assign_wrapper errors more informative.
      
      The error (as determined by tblog) is now stored in the database in a
      more structured fashion.  This inlcudes adding a column for the session
      (in the log table) to testbed_stats to link eash swap event with the
      logs and possible the error.
      
      Other changes to the database, see sql/database-migrate.txt
      d258dde6
    • Timothy Stack's avatar
  9. 20 Mar, 2006 1 commit
  10. 15 Mar, 2006 1 commit
  11. 01 Mar, 2006 1 commit
  12. 24 Feb, 2006 1 commit
  13. 15 Feb, 2006 1 commit
    • David Johnson's avatar
      * Makeconf.in, configure, configure.in, defs-default, defs-johnsond-emulab: · 4982b9cd
      David Johnson authored
          - added a new defs var, TBROBOCOPSEMAIL
      
        * tbsetup/power_mail.pm.in:
          - add some new info to robot powerup mails
      
        * db/libdb.pm.in:
          - add a new function to determine if an experiment contains nodes of a
            given class/type
      
        * tbsetup/swapexp.in:
          - check if exp is a robot exp; that is, if it has robots or motes; if
            so, cc error msgs to TBROBOCOPSEMAIL in addition to TBOPS
      4982b9cd
  14. 07 Feb, 2006 2 commits
  15. 02 Feb, 2006 1 commit
    • Timothy Stack's avatar
      · 11f6065f
      Timothy Stack authored
      Finish off changes to consult the os_boot_cmd table when setting
      def_boot_cmd_line.
      
      	* db/libdb.pm.in: Add TBGetOSBootCmd function that returns the
      	boot command line for an osid/role.
      
      	* sql/database-fill-supplemental.sql: Add some queries that
      	initialize the os_boot_cmd table.
      
      	* tbsetup/assign_wrapper.in: For nodes that need linkdelays or
      	inner elab boss nodes, set their command line using
      	TBGetOSBootCmd.  Since the TBGetOSBootCmd function needs a "real"
      	OSID to work, we resolve the nextosid for any meta OSIDs.
      
      	* tbsetup/elabinelab.in: Add os_boot_cmd to the list of full
      	tables to be dumped.
      
      	* tbsetup/ns2ir/elabinelab-withfsnode.ns,
      	tbsetup/ns2ir/elabinelab.ns: Remove boot command lines,
      	assign_wrapper does it instead.
      11f6065f
  16. 30 Jan, 2006 1 commit
  17. 26 Jan, 2006 1 commit
    • Kevin Atkinson's avatar
      · 05015359
      Kevin Atkinson authored
      Merged in changes from tblog-2-branch:
      
                Move parts of libtblog into libtblog_simple.  Libtblog simple
                provided the basic logging functions but doesn't touch anything.
                Moreover including libtblog_simple doesn't automatically start
                the logging subsystem.  It also doesn't have testbed dependencies
                which mean 1) it can be used in the core testbed libraries (such
                as libdb, libtestbed) without introducing a circular dependency
                and 2) can be used independently.
      
                Reworked DBFatal and DBWarn to use tblog.  It will still email
                testbed-ops, however.
      
                Make use of the "cause" field to determine the cause of the bug.
                In particular tblog_find_error will look at the value of this
                field and report the "cause".  In the future different actions
                can be taken based on the ultimate "cause" of the bug, such as if
                testbed-ops should be notified.
      
                Change format of Error Message reported by libtblog.  As per the
                email "Format or Error Messages" ro testbed-dev.
      
                Have libtblog use its own Database handle to avoid problems with
                locked tables.
      
                Also set DBCONN_MAXTRIES to 3 for most important queries.  For
                queries that are not important don't send mail on error.
      05015359
  18. 23 Jan, 2006 2 commits
  19. 17 Jan, 2006 2 commits
  20. 02 Jan, 2006 1 commit
    • Timothy Stack's avatar
      · bd20dd17
      Timothy Stack authored
      First cut at a daemon that does regular checkups of the testbed
      hardware/software.
      
      	* configure, configure.in: Add tbsetup/checkup directory.
      
      	* db/audit.in: Add a listing of stuck checkups.
      
      	* install/boss-install.in: Add 'elabckup' user.
      
      	* rc.d/3.testbed.sh.in: Startup the checkup_daemon.
      
      	* sql/database-create.sql, sql/database-migrate.txt: Add the
      	checkups tables.
      
      	* tbsetup/GNUmakefile.in: Descend into the checkup directory.
      
      	* tbsetup/checkup: The checkup daemon, man page, and
      	  associated scripts.
      
      	* tbsetup/ptopgen.in: Add a feature with a value of 0.9 to
      	  prereserved nodes to keep them from being allocated unless
      	  they're really wanted.
      
      	* utils/firstuser.in: Add some other options so the script can be
      	  used to create other pseudo users.
      bd20dd17
  21. 27 Dec, 2005 1 commit
    • Mike Hibler's avatar
      More tightly connect the notion of a firewall and the security level. · f1206314
      Mike Hibler authored
      If you specify an explicit firewall, you are implicitly assigned security
      level 2 and you cannot explicitly specify the security level.  Likewise,
      if you specify a security level, you cannot also specify a firewall.
      
      The reason for this is that security level 1 (aka "Blue") now has a slightly
      different meaning.  It is intended for protecting the inside from the outside
      rather than visa-versa.  The only practical implication of this is that for
      level 1, we don't do all the fancy power-off-boot-into-MFS-zapbootblock stuff
      that we do for higher levels.
      
      Anyway, I wanted to make sure that if you specify your own firewall, you
      DO have to go through the full cleansing swapout since we can't trust a
      firewall that the Average Joe sets up.
      f1206314
  22. 21 Dec, 2005 1 commit
  23. 19 Dec, 2005 3 commits
    • Leigh Stoller's avatar
      d2ede4b9
    • Leigh Stoller's avatar
      Add some simple support for capturing external files that are included · 95ec7066
      Leigh Stoller authored
      into the main NS files via the "source" command, and stuffing them
      into the experiment archive.
      95ec7066
    • Leigh Stoller's avatar
      Add support for moving deleted users to a deleted users table. This · b4231fbf
      Leigh Stoller authored
      would be no big deal, except that we want to retain user_stats for
      deleted users, and rather then a deleted_user_stats table, I want to
      retain stats for deleted users in the user_stats table, since that
      is a more natural place for them.
      
      The main problem is that we use the login (uid) as the cross table
      reference slot all over the DB, which is fundamentally incorrect, if
      we want to be able reuse uids and still know what historical data
      refers to.
      
      So, I have taken a few baby steps towards weaning us off the uid, and
      towards permanently unique key for users, using the unix_uid integer
      for now, but probably something slightly different later.
      
      The user_stats is now indexed on this new key (called uid_idx in the
      users_stats table) instead of the plain uid.
      
      The unix_uid slot in the users table is no longer an auto_increment
      field, but instead uses the emulab_indicies table for the next
      available index.
      b4231fbf
  24. 15 Dec, 2005 2 commits
    • Kirk Webb's avatar
      · 41c54939
      Kirk Webb authored
      The revived Plab interface is here!
      
      Lots of updates to the plab backend, including improved plab <-> elab node
      id translation and update handling.  Includes support for the current PLC
      API, and the new pl_conf node manager interface API.  Several more db library
      routines were ported from the perl library to the python one to support the
      new code (mostly the node_id tracking stuff).  Fixes to the client side and
      also a rootball creation cleanup (binaries removed from the CVS repo).
      
      There are also enhancements to the experiment view page for experiments
      including plab nodes: site and widearea hostname are now displayed along
      with the other node information.
      
      Note that the way setup timeout for vnodes is calculated has been changed a
      bit.  Instead of using a hardwired base timeout, the base timeout is now
      based on the reload_waittime database field, which comes from the 'OS'
      (e.g., FBSD-JAIL, RHL-PLAB) the vnode runs.
      
      The default max duration for a plab slice created through the plab_ez interface
      is set to 1 year, and linktest is currently disabled and hidden through
      the ez interface.
      
      There is still work to do, but this checkin brings with it a functional
      plab portal!
      41c54939
    • Leigh Stoller's avatar
      Commit the current archive support. Currently exposed to only · 6a0a1eb7
      Leigh Stoller authored
      studly users in the testbed project on the mainsite.
      6a0a1eb7
  25. 14 Dec, 2005 1 commit
  26. 12 Dec, 2005 1 commit
  27. 07 Dec, 2005 1 commit
  28. 06 Dec, 2005 1 commit
    • Mike Hibler's avatar
      Phase II in disk state saving for swapout. · ed0d25b4
      Mike Hibler authored
      Exec summary: after this checkin, the infrastructure exists (once enabled)
      to create swapout-time "delta" images for all machines in experiments.
      There is only a single, cumulative swap image per node (i.e., all diffs
      are from the base image, not from the previous swap).
      
      What doesn't yet exist, is the mechanism for reloading the delta at
      swapin time.  That is Phase III.
      
      The nitty-gritty:
      
      1. Keep disk image signature files for all nodes in an experiment.
      
         New fields in the DB to track, for each disk partition, what image the
         partition was loaded from.  This enables us at swapin or os_load time to
         create signature files in /proj/<pid>/exp/<eid>/swapinfo for the current
         contents of a node disk/partition.  All nodes with the same image loaded
         will share (via symlink) the same signature file.  TODO: no longer
         referenced signature files should be removed.
      
         Signature info is only collected in the swapinfo directory if the
         experiment is set to have disk state saving enabled (see #5 below).
         Info consists of the <vname>.sig file, which is the file created
         by imagehash, and <vname>.part which says what the root disk is
         for the node and whether to look at the whole disk or just a single
         partition when crafting the delta image.
      
      2. Swapout-time hook for creating swapout image.
      
         If the experiment is marked as allowing disk state saving, tbswap
         will arrange to run and then monitor the create-swapimage command
         on each node.  This script will run the modified version of imagezip
         which uses the signature file to create a delta image.
      
         The command to run and maximum timeout are specified via sitevars
         (previously checked in).  Note that the tbswap script currently has
         special knowledge of /usr/local/bin/create-swapimage as a swapout
         time script.  If the swap/swapout_command sitevar is set to that,
         Magic Stuff shall occur (i.e. it will monitor the command and make
         periodic reports of progress).  The sitevars are a total hack and
         will disappear at some point.
      
      3. Client-side script for creating swapout image.
      
         os/create-swapimage, very similar to create-image.  Uses the info
         stashed in /proj/..blahblah../swapinfo to create a delta image.
      
         XXX fer now hack: the script first looks in /proj/<pid>/bin for an
         imagezip binary to use.  Failing that, it uses the one in the MFS.
         This allows for easier development of the imagezip changes (i.e.,
         don't have to update the MFS every time.
      
      4. Auto creation of signature files for new images.
      
         The create_image script (the one that runs on boss when creating images
         for users) has been modified to automatically create a signature via
         imagehash.  The .sig file winds up in /usr/testbed/images/sigs or
         in /proj/<pid>/images/sigs.  From there it will be copied at swapin/os_load
         time to the per-expt swapinfo directory for any node that uses the images.
      
         The process for creating standard system images (aka, "Mike") has not
         yet been modified.  When the image creation/installation procedure
         is formalized into a script, this will be done.
      
      5. Web changes to set/clear saving of disk state at swapout time.
      
         Add a checkbox to the experiment create page to allow setting "save
         swap state".  Also added to the experiment modify page, but currently
         "if (0)"ed out as it will need some additional support.  The showstuff
         page will show it.
      
         Taking a page from Leigh's hack book, if EXPOSESTATESAVE in defs.php3
         is set to zero (as it is now), then the checkbox doesn't appear in the
         create experiment page except for STUDLY users.
      ed0d25b4
  29. 01 Dec, 2005 4 commits
  30. 29 Nov, 2005 1 commit