1. 22 Apr, 2002 1 commit
  2. 17 Apr, 2002 1 commit
    • Robert Ricci's avatar
      Moved EventSend calls to the TBSetNodeEventState() function. This has · 15c13c32
      Robert Ricci authored
      two benefits: (1) More general (2) Regains ability to run without the
      event system. Previously, since programs that watned to set node state
      had to 'use event', this broke our ability to run without the event
      system. Now, we can do a check in libdb for the event system, and not
      use it if EVENTSYS is not set. If not, we update state in the database
      directly rather than sending an event.
      
      Also added equivalent calls for node operational mode, as well as new
      constants for both state and mode.
      
      Converted power and node_reboot to use this new scheme.
      15c13c32
  3. 15 Apr, 2002 1 commit
  4. 08 Apr, 2002 1 commit
    • Leigh B. Stoller's avatar
      Add generation of per-project email lists, as per Dave's request. The · 8cac9c47
      Leigh B. Stoller authored
      lists are stored on users:/etc/mail/lists. For example, you can send
      email to ron-users@users.emulab.net. An alias entry is added (and
      newaliases run) if there is no alias in /etc/mail/aliases (by the proxy
      of course). There are two new options to genelists (on boss):
      
      	"Use the -a option to generate lists for all projects.\n".
      	"Use the -n option to generate lists for a new user.\n";
      
      With no options, generate the all users and active users lists
      (renamed to emulab-users and emulab-active-users). With the -n option
      (used by mkacct) regen the lists for all the projects the user is a
      member of.
      
      It would be nice to archive the email, but that requires a publically
      readable directory and a u+S archive file; the mailer daemon runs as
      user daemon, and the project tree is 770, so it cannot write the
      archive file. At some point we will have to go to majordomo or spam
      filtering, when the first list is spamm'ed. Sigh.
      8cac9c47
  5. 03 Apr, 2002 1 commit
  6. 02 Apr, 2002 2 commits
  7. 01 Apr, 2002 2 commits
    • Robert Ricci's avatar
      Fixed some event-system constants · d28662b8
      Robert Ricci authored
      d28662b8
    • Leigh B. Stoller's avatar
      First cut at supporting RON (or more generally, remote nodes). · bd587829
      Leigh B. Stoller authored
      * tmcd/ron: A new directory of client code, based on the freebsd
        client code, but scaled back to the bare minimum. Does only account
        and group file maintenance. I redid the account stuff so that only
        emulab accounts are operated on. Does not require a stub file, but
        instead keeps a couple of local dbm files recording what groups and
        accounts were added by Emulab. There is a ton of paranoia checking
        to make sure that local accounts are not touched.
      
        The update script that runs on the client node detaches so that the
        ssh from boss returns immediately. update can also be run from the
        node periodically and at boottime. The script is installed setuid
        root, but checks to make sure that *only* root or "emulabman" has
        invoked it.
      
      * utils/sshremote: New file. For remote nodes, instead of using sshtb,
        use sshremote, which ssh's in as "emulabman", which needs to be a
        local non-root user, but with an authorized_keys file containing
        boss' public key.
      
      * web interface changes: Allow user to specify his own public key in
        addition to the emulab key.
      
        Add option in showexp page to update accounts on nodes in the
        experiment. I was originally intending to do this from approveuser,
        but this was easier and faster. I will add an option to do it on the
        approveuser page later.
      
      * libdb.pm: Add a TBIsNodeRemote() query to see if a node is in the
        local testbed or a pcRemote node. Currently, this test is hardwired
        to a check for class=pcRemote, but this will need to change to a
        node_types property at some point.
      
      * node_update: Reorg so that there is a maximum number of children
        created. Previously, a child was forked for each node, but that
        could chew up too many processes, especially for remote nodes which
        might hang up. For the same reason, we need to "lock" the experiment
        so that it cannot be terminated while a node_update is in progress.
        Might be to relax that, but this was easy for now. Also add
        distinction between local and remote, since for remote we use
        sshremote insted of sshtb. Various cleanup stuff
      
      * mkacct; When generating a new account, include user supplied pub key
        in the authorized keys file, in addition to the eumlab generated
        key. Both keys are stored in the DB in the users table. Anytime we
        update an account, get a fresh copy of the emulab pub key, in case
        user changes it.
      bd587829
  8. 07 Mar, 2002 1 commit
  9. 05 Mar, 2002 2 commits
  10. 04 Mar, 2002 1 commit
    • Robert Ricci's avatar
      New script: schemacheck - Checks to see if the currently-running database · e42f812d
      Robert Ricci authored
      matches the one in the checked-out source.
      
      This now gets called as part of the 'boss-install' target, to guard
      against installing software that is out-of-sync with the running
      database. It is skipped if @prefix@ is not /usr/testbed, to avoid
      getting in the way of development.
      
      If you want to bypass this check, use the 'boss-install-force' target.
      Use of this, however, is not recommended.
      e42f812d
  11. 21 Feb, 2002 1 commit
  12. 12 Feb, 2002 3 commits
  13. 11 Feb, 2002 4 commits
    • Leigh B. Stoller's avatar
      Ug, forgot to commit this file! Sorry! · 248fdcc0
      Leigh B. Stoller authored
      248fdcc0
    • Robert Ricci's avatar
      Some fixes to prevent extra output. Redirect STDERR on fping to · 5750763f
      Robert Ricci authored
      STDOUT, and move around some lines to avoid undefined value
      warnings.
      5750763f
    • Leigh B. Stoller's avatar
      Add boottime init script to clear various DB tables at boot time, or · 31bf08b9
      Leigh B. Stoller authored
      whatever other maintenance is required.
      31bf08b9
    • Leigh B. Stoller's avatar
      Changes to how the backup files are named and saved. The existing · b31fdcdc
      Leigh B. Stoller authored
      naming scheme was not very intuitive and the names sucked. Also, I
      want to increase the frequency with which we run the backups, and I
      want to implement an automated roll so that we only keep about a
      months worth of history around.
      
      Anyway, the new approach is to open up the index file and see what the
      name of the current update file is. It has a numeric extension. Rename
      the base log to base.XXX, and then snapshot the DB into backup.XXX So,
      the combination of update.XXX and base.XXX is the DB history since the
      last time the script was run. The file backup.XXX corresponds to the
      DB at this point in time.
      
      To restore (or track the changes of) a DB, simply take backup.XXX and
      apply the changes that are stored in update.XXX+1 (which are the changes
      made since backup.XXX was made). This should give you a DB that is the
      same as backup.XXX+1. You can go back further, and just apply all the
      subsequent update.XXX files.
      b31fdcdc
  14. 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
  15. 04 Feb, 2002 1 commit
    • Robert Ricci's avatar
      Improved output (include column name in the output for violations.) · a9532a33
      Robert Ricci authored
      Also implemented a simple cache for previously-queried keys. Now
      stores the keys found in, say, nodes.node_id, so when another
      table references this key, we don't need to do another database
      query. This improves performance significantly, and is nicer to
      the databse server.
      a9532a33
  16. 29 Jan, 2002 1 commit
    • Robert Ricci's avatar
      New script: interswitch · da928f5a
      Robert Ricci authored
      A simple little script to find links/lans that cross between switches,
      and print them out (including which switches they use, and how many
      members they have on each switch.)
      da928f5a
  17. 24 Jan, 2002 1 commit
    • Robert Ricci's avatar
      New script: dbcheck . Beginngs of a database consistency checker. · 441dfb4a
      Robert Ricci authored
      Right now, it loads foreign key information from the foreign_keys
      table of the database, and prints out information on rows that fail
      the consistency checks.
      
      The plan is that it will eventually check more things, such as the
      existence of files references in the database.
      441dfb4a
  18. 18 Jan, 2002 1 commit
  19. 17 Jan, 2002 1 commit
  20. 16 Jan, 2002 1 commit
  21. 15 Jan, 2002 1 commit
  22. 10 Jan, 2002 1 commit
    • Leigh B. Stoller's avatar
      A set of capture/capserver/DB changes. · 8ec05f0d
      Leigh B. Stoller authored
      Capserver and capture now handshake the owner/group of the tipline.
      Owner is defaults to root, and the group defaults to root when the
      node is not allocated. Capture will do the chmod after the handshake,
      so if boss is down when capture starts, the acl/run file will get 0,0,
      but will get the proper owner/group later after its able to handshake.
      As a result, console_setup.proxy was trimmed down and cleaned up a
      bit, since it no longer has to muck with some of this stuff.
      
      A second change was to support multiple tiplines per node. I have
      modified the tiplines table as such:
      
      	| Field   | Type        | Null | Key | Default | Extra |
      	+---------+-------------+------+-----+---------+-------+
      	| tipname | varchar(32) |      | PRI |         |       |
      	| node_id | varchar(10) |      |     |         |       |
      	| server  | varchar(64) |      |     |         |       |
      
      That is, the name of the tip device (given to capture) is the unique
      key, and there can be multiple tiplines associated with each node.
      console_setup now uses the tiplines table to determine what tiplines
      need to be reset; used to be just the name of the node_id passed into
      console_setup. Conversely, capserver uses the tipname to map back to
      the node_id, so that it can get the owner/group from the reserved
      table.
      
      I also removed the shark hack from nalloc, nfree, and console_reset,
      since there is no longer any need for that; this can be described
      completely now with tiplines table entries. If we ever bring the
      sharks back, we will need to generate new entries. Hah!
      8ec05f0d
  23. 08 Jan, 2002 1 commit
  24. 07 Jan, 2002 1 commit
  25. 04 Jan, 2002 1 commit
    • Robert Ricci's avatar
      New script: unixgroups . Pretty simple - just a convenient way to manage the · 469dacdb
      Robert Ricci authored
      unixgroup_membershit table from the command line. Runs the appropriate
      commands to make changes in the 'real world' after the database has been
      updated. From the usage message:
      
      Usage: unixgroups <-h | -p | < <-a | -r> uid gid...> >
      -h            This message
      -p            Print group information
      -a uid gid... Add a user to one (or more) groups
      -r uid gid... Remove a user from one (or more) groups
      469dacdb
  26. 03 Jan, 2002 1 commit
  27. 13 Dec, 2001 1 commit
  28. 06 Dec, 2001 2 commits
  29. 05 Dec, 2001 1 commit
    • Leigh B. Stoller's avatar
      Even *more* inventive ways to avoid real work; Add DB table to hold · c884cd89
      Leigh B. Stoller authored
      extra unix groups (unixgroup_membership) for special local users that
      need more groups than just their project membership (ie: flux, wheel,
      etc). In mkacct-ctrl, no longer use the admin bit to determine extra
      groups (which were hardwired in), but get the extra group list from
      the DB. This applies to accounts on boss/users; experimental nodes
      still use the admin bit (via tmcd) to get wheel added to the group
      set. Might be worth doing at some point.
      c884cd89
  30. 30 Nov, 2001 1 commit
  31. 06 Nov, 2001 1 commit