1. 17 Apr, 2002 1 commit
  2. 01 Apr, 2002 1 commit
    • 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
  3. 04 Mar, 2002 1 commit
  4. 01 Mar, 2002 1 commit
  5. 12 Feb, 2002 1 commit
  6. 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
  7. 01 Feb, 2002 3 commits
    • Robert Ricci's avatar
      Added some checks for key types, etc. that are currently not used in · 6d6d755b
      Robert Ricci authored
      the testbed database anywhere. Otherwise, they could accidentally be
      mistaken for columns.
      
      Now, all table options (the 'create_definition' rule in the MySQL
      documentation for 'CREATE TABLE') are recognized.
      6d6d755b
    • Robert Ricci's avatar
    • Robert Ricci's avatar
      New script: schemadiff - a script to sync up the schemas of two · 83341399
      Robert Ricci authored
      databases. This script is not quite ready for usage - I've done some
      testing, but more testing shuld be done before it's widely used.
      
      From the usage message:
      Prints on stdout a set of SQL commands to change the database
      from file1 so that it has the same schema as the database from
      file2 (same argument order as diff)
      
      The files given are the output of mysqldump for the two databases -
      the dump ouput can contain oly column definitions, or it can contain
      row information (which is ignored.)
      
      This script can find and fix: created/dropped tables, created/dropped
      columns, columns that have had type chages, renamed columns, changes
      in primary and other (non-primary) keys. It keeps columns in order
      when creating new tables and adding columns.
      
      There a few things that I still want to do with this script:
      
      Make a framework for populating columns. For example, if column 'foo'
      is added, it would look in some location for a script that would
      populate this column.
      
      Create a wrapper that connects to the database to be updated, backs it
      up, locks all tables, applies the changes, and can recover if
      something goes wrong.
      
      Add a 'safe mode' (which would be the default), which won't remove
      columns or tables.
      
      There are a few caveats:
      
      Columns that have been _both_ renamed and had their type changed will
      be dropped and re-created, since it's impossible to detect this case.
      
      There may be some ordering issues. For example, the primary key for a
      table may need to be dropped before you can allow a column that used
      to be in the primary key in the primary key to contain NULLs.
      
      Will only work in one direction - a master-slave type relationship. If
      used between databases that have _both_ been changed, changes in the
      database being updated first will be lost.
      83341399
  8. 24 Jan, 2002 1 commit
  9. 23 Jan, 2002 1 commit
  10. 03 Jan, 2002 1 commit
  11. 27 Nov, 2001 1 commit
  12. 15 Nov, 2001 2 commits
  13. 31 Oct, 2001 1 commit
    • Leigh B. Stoller's avatar
      A bunch of backend delay node changes. Change the delays DB table to · fe13d60f
      Leigh B. Stoller authored
      hold separate values for each of the two pipes. This allows us to
      treat the links asymmetrically with respect to the delay node
      configuration. Changes to tmcd to return the expanded info, and rework
      (completely) delay_config to allow user to change the duplex
      characteristics (just like before), or just simplex characteristics by
      specifying the pipe number. By convention (I invented) pipe 0 is
      traffic coming in on iface0. Of course, none of the front end stuff
      has been changed, so the changing a single pipe does not cause
      anything in virt_lans to be changed, so those changes will be lost at
      swapout. Also get rid of all the ssh'ed pipe config stuff in
      delay_config. Instead, add a client side script called update_delays
      to /etc/testbed on the experiment nodes. After updating the delays
      table, just ssh over and run that script, which calls the existing
      code. Less distribution of knowledge.
      fe13d60f
  14. 24 Oct, 2001 1 commit
  15. 22 Oct, 2001 1 commit
  16. 16 Oct, 2001 1 commit
  17. 15 Oct, 2001 1 commit
  18. 03 Oct, 2001 1 commit
  19. 20 Sep, 2001 1 commit
  20. 19 Sep, 2001 2 commits
  21. 18 Sep, 2001 1 commit
  22. 06 Sep, 2001 1 commit
  23. 30 Aug, 2001 2 commits
  24. 28 Aug, 2001 1 commit
    • Leigh B. Stoller's avatar
      Cleanup of the Chris' TB scripts. Cosmetic in principle, but reworked · c874636d
      Leigh B. Stoller authored
      to use the DB library access routines, which also changed in response
      to what the tb scripts needed. Added some functions and mor constants.
      Removed the -nologfile option from all the scripts (startexp and
      endexp too), since there is no reason for these scripts to worry about
      log files. Thats handled in the wrappers. Tested with the testsuite
      and live in my own tree.
      c874636d
  25. 23 Aug, 2001 1 commit
    • Mac Newbold's avatar
      Lots of small changes for turning our 'require lib*' lines into 'use lib*'... · e2ed8a1c
      Mac Newbold authored
      Lots of small changes for turning our 'require lib*' lines into 'use lib*' lines. Proper modules declare themselves as a package, and use Exporter to export the names of the subroutines that should be visible from the outside world. Many of ours didn't do that, it was just a file with a bunch of subs in it. So now I've fixed many of them to be proper, and removed the requires and 'push(@INC,...)' hacks and changed it to the proper 'use lib @prefix@/lib/;' and use lib*.
      e2ed8a1c
  26. 17 Aug, 2001 1 commit
  27. 13 Aug, 2001 1 commit
    • Robert Ricci's avatar
      New script: fillwires.pl · 8a59bf74
      Robert Ricci authored
      Takes information recorded during the wiring process, and generates SQL
      commands to insert these wires into the database. Should be a big timesaver.
      8a59bf74
  28. 10 Aug, 2001 1 commit
  29. 09 Aug, 2001 1 commit
  30. 01 Aug, 2001 1 commit
    • Leigh B. Stoller's avatar
      An attempt at making image creation an easy/automatic operation. HA! · 27f26d99
      Leigh B. Stoller authored
      This uses the pxe booted freebsd kernel and MFS. In addition, I use
      the standard testbed mechanism of specifying a startup command to
      run, which will do the imagezip to NFS mounted /proj/<pid>/.... The
      controlling script on paper sets up the database, reboots the node,
      and then waits for the startstatus to change. Then it resets the DB
      and reboots the node so that it returns back to its normal OS. The
      format of operation is:
      
      	create_image <node> <imageid> <filename>
      
      Node must be under the user's control of course. The filename must
      reside in the node's project (/proj/<pid>/whatever) since thats the
      directory that is mounted by the testbed config software when the
      machine boots. The imageid already exists in the DB, and is used to
      determine what part of the disk to zip up (say, using the slice option
      to the zipper). Since this operation is rather time consuming, it does
      the usual trick of going to background and sending email status later.
      27f26d99
  31. 19 Jul, 2001 2 commits
  32. 12 Jul, 2001 1 commit
  33. 26 Jun, 2001 1 commit
    • Robert Ricci's avatar
      New script: sshtb · 9de266c3
      Robert Ricci authored
      sshtb is a _very_ simple shell script that runs ssh with a few commandline
      parameters, which make it play nicer in an script environment. These
      parameters can be changed with the '--with-ssh-args' argument, but default to:
      '-q -o "BatchMode yes" -o "StrictHostKeyChecking no"'
      All ssh calls now use this script.
      9de266c3
  34. 15 Jun, 2001 1 commit