1. 24 Jun, 2002 3 commits
  2. 19 Jun, 2002 1 commit
  3. 13 Jun, 2002 1 commit
  4. 05 Jun, 2002 1 commit
    • Leigh Stoller's avatar
      Changes to sshtb. Remove sshremote, and convert sshtb into a perl · 231fc2b1
      Leigh Stoller authored
      script that checks the database to see if local or remote. The problem
      with this is that the ssh syntax makes it hard to determine the host
      name by inspection. Would need to parse all the ssh args (bad idea),
      ot work backwards and try to figure out the difference between the
      command (which is not a string but a sequence of args) and the host
      and the preceeding ssh args. Hell with that! Changed sshtb to require
      a specific -host argument. Read the args and look for it. Error out of
      not found, to catch improper usage.
      
      The moral of this update: "sshtb [ssh args] -host <host> [more args ...]
      231fc2b1
  5. 23 May, 2002 2 commits
  6. 12 May, 2002 1 commit
  7. 17 Apr, 2002 1 commit
  8. 01 Apr, 2002 1 commit
    • Leigh Stoller's avatar
      First cut at supporting RON (or more generally, remote nodes). · bd587829
      Leigh 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
  9. 04 Mar, 2002 1 commit
  10. 01 Mar, 2002 1 commit
  11. 12 Feb, 2002 1 commit
  12. 08 Feb, 2002 1 commit
    • Leigh Stoller's avatar
      Big round of image/osid changes. This is the first cut (final cut?) at · a73e627e
      Leigh 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
  13. 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
  14. 24 Jan, 2002 1 commit
  15. 23 Jan, 2002 1 commit
  16. 03 Jan, 2002 1 commit
  17. 27 Nov, 2001 1 commit
  18. 15 Nov, 2001 2 commits
  19. 31 Oct, 2001 1 commit
    • Leigh Stoller's avatar
      A bunch of backend delay node changes. Change the delays DB table to · fe13d60f
      Leigh 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
  20. 24 Oct, 2001 1 commit
  21. 22 Oct, 2001 1 commit
  22. 16 Oct, 2001 1 commit
  23. 15 Oct, 2001 1 commit
    • Leigh Stoller's avatar
      Add node_admin command for users. Simply switches between the normal · 85b512e7
      Leigh Stoller authored
      testbed boot process and the freebsd pxeboot/MFS kernel. I'm hoping
      this will be useful enough for users to load their own disk images,
      but we shall see. Usage is simple:
      
      	/usr/testbed/bin/node_admin on|off pcXXX
      
      The "on" state boots the MFS, and the "off" states sets it back to
      normal.
      85b512e7
  24. 03 Oct, 2001 1 commit
  25. 20 Sep, 2001 1 commit
  26. 19 Sep, 2001 2 commits
  27. 18 Sep, 2001 1 commit
  28. 06 Sep, 2001 1 commit
  29. 30 Aug, 2001 2 commits
  30. 28 Aug, 2001 1 commit
    • Leigh Stoller's avatar
      Cleanup of the Chris' TB scripts. Cosmetic in principle, but reworked · c874636d
      Leigh 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
  31. 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
  32. 17 Aug, 2001 1 commit