1. 28 Oct, 2004 1 commit
  2. 06 Oct, 2004 1 commit
  3. 18 Aug, 2004 3 commits
  4. 09 Aug, 2004 1 commit
    • Leigh Stoller's avatar
      Major rework of the script interface to Emulab. Up to now we have been · 5ef8f70a
      Leigh Stoller authored
      supporting both a shell script driven interface, plus the newer XMLRPC
      interface. This change removes the script driven interface from boss,
      replacing it with just the XMLRPC interface. Since we like to maintain
      backwards compatability with interfaces we have advertised to users (and
      which we know are being used), I have implemented a script wrapper that
      exports the same interface, but which converts the operations into XMLRPC
      requests to the server. This wrapper is written in python and uses our
      locally grown xmlrpc-over-ssh library. Like the current "demonstation"
      client, you can take this wrapper to your machine that has python and ssh
      installed, and use it there; you do not need to use these services from
      just users.emulab.net. Other things to note:
      
      * The wrapper is a single python script that has a "class" for each wrapped
        script. Running the wrapper without any arguments will list all of the
        operations it supports. You can invoke the wrapper with the operation as
        its argument:
      
          {987} stoller$ script_wrapper.py swapexp --help
          swapexp -e pid,eid in|out
          swapexp pid eid in|out
          where:
               -w   - Wait for experiment to finish swapping
               -e   - Project and Experiment ID
               in   - Swap experiment in  (must currently be swapped out)
              out   - Swap experiment out (must currently be swapped in)
      
          Wrapper Options:
              --help      Display this help message
              --server    Set the server hostname
              --login     Set the login id (defaults to $USER)
              --debug     Turn on semi-useful debugging
      
         But more convenient is to create a set of symlinks so that you can just
         invoke the operation by its familiar scriptname. This is what I have
         done on users.emulab.net.
      
          {987} stoller$ /usr/tesbed/bin/swapexp --help
          swapexp -e pid,eid in|out
          swapexp pid eid in|out
      
      
      * For those of you talking directly to the RPC server from python, I have
        added a wrapper class so that you can issue requests to any of the
        modules from a single connection. Instead using /xmlrpc/modulename, you
        can use just /xmlrpc, and use method names of the form experiment.swapexp,
        node.reboot, etc.
      
        Tim this should be useful for the netlab client which I think opens up
        multiple ssh connections?
      
      * I have replaced the paperbag shell with a stripped down xmlrpcbag shell
        that is quite a bit simpler since we no longer allow access to anything
        but the RPC server. No interactive mode, no argument processing, no
        directory changing, etc. My main reason for reworking the bag is to make
        it easier to understand, maintain, and verify that it is secure. The new
        bag also logs all connections to syslog (something we should have done in
        the orginal). I also added some setrlimit calls (core, maxcpu). I also
        thought about niceing the server down, but that would put RPC users at a
        disadvantage relative to web interface users. When we switch the web
        interface to use the XMLRPC backend, we can add this (reniceing from the
        web server would be a pain cause of its scattered implementation).
      5ef8f70a
  5. 08 Jul, 2004 1 commit
  6. 11 May, 2004 1 commit
    • Leigh Stoller's avatar
      New event agent to control wireless links. At present, this agent is · 6cf05acb
      Leigh Stoller authored
      very specific to wireless links in general, and to iwconfig on Redhat
      9.0. It allows you to control the entire lan or an individual member
      of a wireless lan via the event system. For example to change the
      accesspoint of a wireless lan, you could do this:
      
      	tevc -e foo/bar now lan0 modify accesspoint=00:09:5B:93:0B:A4
      
      The agent deciphers the event arguments and calls iwconfig with the
      appropriate as needed. Note that there are many ways to make the lan
      unusable doing this, so you want to be careful. You can get the MAC
      addresses from the experiment info page (tbreport).
      
      New script called link_config, which might be badly named since it
      implies generality) to front end tevc. Operates mostly like
      delay_config in that it will change the physical table settings, and
      optionally (-m) the virtual table entries. So,
      
      	link_config testbed two-wireless lan0 accesspoint=00:09:5B:93:0B:A4
      
      You can change individual members of a lan too:
      
      	link_config -s nodew1 testbed two-wireless lan0 txpower=50
      
      Currently no web interface; too much work. I will add an xmlrpc
      interface though since that is easy to do.
      6cf05acb
  7. 10 May, 2004 1 commit
    • Leigh Stoller's avatar
      Silly script to take the testbed commit log that is rsync'ed over each · 39ff000a
      Leigh Stoller authored
      night, and process it into a file to stick into the testbed www
      directory. This replaces the current approach of wishfully thinking
      that people will remember to add their commit log messages to another
      file and them install it. I'm one of the worst offenders these days ...
      
      So, take the commit log, skip up to the first entry in 2004/01, then
      take the rest of the file and reverse the entries. Copy the resulting
      file over to the www directory.
      
      This script is run from cron on our site only!
      
      Note to Opera users; opera does not respect <XMP> properly, and so the
      page is somewhat scrogged by HTML entities that are supposed to be
      ignored when inside an XMP. Works okay on other browsers.
      39ff000a
  8. 26 Apr, 2004 1 commit
    • Mike Hibler's avatar
      Cleanup Makefiles: · 297019fb
      Mike Hibler authored
      1. "make clean" will just remove stuff built in the process of a regular build
      2. "make distclean" will also clean out configure generated files.
      
      This is how it was always supposed to be, there was just some bitrot.
      297019fb
  9. 04 Dec, 2003 1 commit
    • Leigh Stoller's avatar
      New script. · f06d9a59
      Leigh Stoller authored
      Grant permission to use types/class of nodes. If given a specific
      "type", then grant permission to use just that type. If its a class, then
      permission to use all of the types in that class, the class itself, and any
      aux nodetypes for the type/class (node_types_auxtypes table).
      
      For example:
      
      	wap grantnodetype -p testbed pc2000
      	wap grantnodetype -p testbed pcvm
      	wap grantnodetype -p testbed pcplab
      f06d9a59
  10. 26 Nov, 2003 1 commit
  11. 14 Jul, 2003 1 commit
  12. 07 Mar, 2003 1 commit
    • Mac Newbold's avatar
      A few changes to stated: · 92fa4ae2
      Mac Newbold authored
       - fix bad indenting to a uniform 4 spaces (before was 2, 4 and 8 mixed)
       - Move ping-for-isup functionality into a separate script
       - Make sure every transition triggered by stated (directly or indirectly)
         sends an event, instead of taking shortcuts.
      
      This called for a new script, eventping, which just pings until the node
      is pingable, then sends an ISUP event. Stated runs this in the background
      where necessary, and nothing else should run it.
      
      Adding eventping meant modifying configure and the utils makefile, too.
      92fa4ae2
  13. 13 Feb, 2003 1 commit
  14. 26 Aug, 2002 2 commits
    • Leigh Stoller's avatar
      Rework all of the ssh key handling. Moved the parsing and verification · ae77bdb6
      Leigh Stoller authored
      to an external perl script, and use ssh-keygen to attempt conversion
      off SSH2/SECSH key formats. This is actually a simplification of the
      php code, which is not generally very good at this kind of thing (or
      maybe I mean perl is just better at it). The parsing and error
      handling it also much improved.
      ae77bdb6
    • Leigh Stoller's avatar
      Minor reorg of cvsupd startup. It now gets started by perl script that · 541a3586
      Leigh Stoller authored
      flips the uid/gid to nobody/nobody. It would be good to run this in a
      chroot shell, but that would be difficult given that we cannot easily
      rebuild cvsupd (modula-3). The right solution is to either run it in a
      jail or to move it to ops.
      
      Note, files in the sup tree obviously have to be world readable for
      cvsupd to send them off.
      541a3586
  15. 07 Jul, 2002 1 commit
  16. 01 Jul, 2002 1 commit
  17. 24 Jun, 2002 1 commit
  18. 13 Jun, 2002 1 commit
  19. 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
  20. 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
  21. 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
  22. 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
  23. 18 Sep, 2001 1 commit
  24. 01 Aug, 2001 1 commit
    • Leigh Stoller's avatar
      An attempt at making image creation an easy/automatic operation. HA! · 27f26d99
      Leigh 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
  25. 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
  26. 30 May, 2001 1 commit
  27. 11 Apr, 2001 1 commit
  28. 20 Mar, 2001 1 commit
  29. 08 Jan, 2001 2 commits
  30. 05 Jan, 2001 1 commit
  31. 04 Jan, 2001 2 commits
    • Leigh Stoller's avatar
      Another small set of install changes for ops vs control node. I put in · 471e3f81
      Leigh Stoller authored
      simple autogen of the symlinks to plasticwrap on the control node, and
      added control-install targets in several more directories.
      471e3f81
    • Robert Ricci's avatar
      New script: if2port - Find switch port(s) for a node's interface(s). · b791b121
      Robert Ricci authored
      Usage: if2port <node | node:if | node if>
      Example:
      <ricci@paper:~>./if2port tbpc01
      +--------+-----+--------+-----+-----+
      |node_id1|card1|node_id2|card2|port2|
      +--------+-----+--------+-----+-----+
      |tbpc01  |    0|cisco   |    3|   25|
      |tbpc01  |    1|cisco   |    3|   27|
      |tbpc01  |    2|cisco   |    3|   29|
      |tbpc01  |    3|cisco   |    3|   31|
      |tbpc01  |    4|cisco2  |    3|    1|
      +--------+-----+--------+-----+-----+
      5 rows processed
      
      <ricci@paper:~>./if2port tbpc01:0
      +--------+-----+--------+-----+-----+
      |node_id1|card1|node_id2|card2|port2|
      +--------+-----+--------+-----+-----+
      |tbpc01  |    0|cisco   |    3|   25|
      +--------+-----+--------+-----+-----+
      1 row processed
      
      <ricci@paper:~>
      b791b121
  32. 03 Jan, 2001 1 commit
  33. 02 Jan, 2001 1 commit
  34. 18 Dec, 2000 1 commit
  35. 01 Dec, 2000 1 commit