1. 24 Oct, 2002 1 commit
    • Leigh B. Stoller's avatar
      Add stuff to update the SFS keys on the fileserver after someone uses · cc1c4e54
      Leigh B. Stoller authored
      the web page to add/delete a key! Nodes were getting updated, but
      the SFS server was not cause there was no program to fire the new keys
      over there.
      
      The operation is currently simple. sfskey_update on boss constructs a
      new sfs_users file. Then it runs sfskey_update.proxy on ops (vis ssh
      of course), and gives it the new file via stdin. The proxy creates the
      .pub version from that file, and then moves the two new files into
      place in /etc/sfs. I employ the same locking stuff that Rob did in
      exports_setup and named_setup to prevent multiple updates from
      stacking up. Not likely, but might as well. Also note that the entire
      file is regenerated. When we get 5000 users this might have to change
      a little bit!
      
      Also changed mkacct slightly. Instead of doing a "sfskey register" on
      ops after generating the new key, just add it to the DB. Then fire off
      an sfskey_update to push the new keys over. Also add a -f flag to
      mkacct for use from the web page to indicate that the user has changed
      his SFS keys. Note that mkacct should probably take a series of flags
      since we have it as a wrapper for several things. Or maybe split all
      this stuff up.
      cc1c4e54
  2. 18 Oct, 2002 1 commit
    • Mac Newbold's avatar
      Merge the newstated branch with the main tree. · 5c961517
      Mac Newbold authored
      Changes to watch out for:
      
      - db calls that change boot info in nodes table are now calls to os_select
      
      - whenever you want to change a node's pxe boot info, or def or next boot
      osids or paths, use os_select.
      
      - when you need to wait for a node to reach some point in the boot process
      (like ISUP), check the state in the database using the lib calls
      
      - Proxydhcp now sends a BOOTING state for each node that it talks to.
      
      - OSs that don't send ISUP will have one generated for them by stated
      either when they ping (if they support ping) or immediately after they get
      to BOOTING.
      
      - States now have timeouts. Actions aren't currently carried out, but they
      will be soon. If you notice problems here, let me know... we're still
      tuning it. (Before all timeouts were set to "none" in the db)
      
      One temporary change:
      
      - While I make our new free node manager daemon (freed), all nodes are
      forced into reloading when they're nfreed and the calls to reset the os
      are disabled (that will move into freed).
      5c961517
  3. 09 Oct, 2002 1 commit
    • Mac Newbold's avatar
      Add a new script: tbresize · 0dd12dba
      Mac Newbold authored
      (installs into /usr/testbed/bin/tbresize but isn't avail. on ops yet)
      
      Usage: tbresize [-d] -a -e pid,eid -n num -t type [-p prefix]
             tbresize [-d] -r -e pid,eid <node> [<node> ...]
             tbresize -h
      Use -h to show this usage message.
      Use -d to enable extra debugging output.
      Use -a to add nodes to an experiment.
      Use -r to remove nodes from an experiment.
      Use -e pid,eid to specify the experiment to resize.
      Use -n to specify the number of nodes to add.
      Use -t to specify the type of the nodes to be added (pc, pc850, pc600,
      etc).
      Use -p to specify a prefix for vnames (i.e. "node" => node0 .. nodeN).
      With -r, specify a list of one or more nodes to be removed (i.e. pcXX).
      
      Can even resize an expt down to no nodes then back up again. If it has
      one LAN/link in the expt, it adds the new nodes to it. If it has zero or
      more than one, it doesn't connect the new nodes to the topology.
      
      After finding and reserving (or before freeing) it fixes up the right
      places in the db and reruns snmpit, then reruns exports_setup and
      named_setup and reboots all the nodes that are now in the expt so they get
      updated configuration data.
      
      Even visualizes properly after being resized, the only catch is that the
      ns file is the original one, not one generated from the db.
      
      Use it, abuse it, have fun with it, and let me know what breaks.
      0dd12dba
  4. 02 Oct, 2002 1 commit
    • Chad Barb's avatar
      Initial version of delay web control. · dd27f82a
      Chad Barb authored
      Functional, but needs some work.
      Won't allow non-admins to use it (since it doesn't do "proper" permission checking yet.)
      Input is aggressively checked for bad mojo before being pasted into any command line.
      
      Run from /delaycontrol.php3?eid=exptname&pid=projname
      Admin bit must be on.
      dd27f82a
  5. 10 Sep, 2002 1 commit
  6. 06 Sep, 2002 1 commit
  7. 11 Jul, 2002 1 commit
  8. 07 Jul, 2002 1 commit
  9. 28 Jun, 2002 1 commit
  10. 24 Jun, 2002 1 commit
  11. 11 Jun, 2002 1 commit
  12. 31 May, 2002 1 commit
  13. 24 May, 2002 1 commit
    • Robert Ricci's avatar
      New script: checkports · 64c78cae
      Robert Ricci authored
      Checks to make sure that all ports for an experiment are in the
      correct switch state. If they are enabled, they should have
      carrier.
      
      Note that enough code is shared between checkports and portstats
      that some of it could probably be moved to a library at this
      point.
      64c78cae
  14. 16 May, 2002 1 commit
  15. 14 May, 2002 1 commit
  16. 09 May, 2002 1 commit
    • Leigh B. Stoller's avatar
      Commit the static routing support. Invoked from tbprerun, after the · 712fe222
      Leigh B. Stoller authored
      parser runs. The staticroutes script is a wrapper for Chad's route
      solver. The network optimization is currently turned off; use -t to
      turn it on, until I know if its correct.
      
      Note that Chad gets credit for routecalc.cc; I'm just committing the
      file for him, with a couple of trivial changes that I made.
      712fe222
  17. 08 May, 2002 1 commit
  18. 06 May, 2002 1 commit
    • Chad Barb's avatar
      · cc1dfea4
      Chad Barb authored
      added build of wanlinksolve.cc
      cc1dfea4
  19. 18 Apr, 2002 1 commit
  20. 02 Apr, 2002 1 commit
    • Leigh B. Stoller's avatar
      Ah, the things I do. Added web page and backend script to scroll the · 07323144
      Leigh B. Stoller authored
      experiment log file to the user as it gets generated. The web page
      does not redraw, it just never exits until the backend sees that the
      experiement transition is done, and then it exists, which terminates
      the script. I added a DB field to hold the logfile name and some
      routines in libdb, with the idea that this might be more generally
      useful at some point. Next time you create an experiment, look for the
      last sentence, and click on "realtime".
      07323144
  21. 11 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Rename exports_setup.proxy and console_setup.proxy to .in versions and · 589d4872
      Leigh B. Stoller authored
      remove the originals, so that we can run the files through configure.
      
      NOTE: I wanted to keep the RCS history intact so I went over to the
      CVS directory on moab and copied the ,v file to the new names, and
      then did a normal cvs remove the originals. This keeps the RCS history
      going without screwing up anyone. Not a recommended approach, but what
      the hell.
      589d4872
  22. 08 Mar, 2002 1 commit
  23. 07 Mar, 2002 1 commit
  24. 05 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      A wide ranging set of event system changes: · 0318cc22
      Leigh B. Stoller authored
      assign_wrapper.in: Hack in a change that ensures a delay node is
      created for any link on which an event is posted (up,down,modify),
      no matter what its initial parameters are. ie: If a link is created
      with no delay, but there is an event that adds a delay later, then we
      must drop in a delay node. Same for up/down on a link. We do this in
      the delay node. I am reasonably confident that this change is fine for
      duplex links, but I am less sure of the effect on lans!
      
      eventsys_control.in: Checkpoint latest changes. Add "replay" option,
      which right now just stops and starts the event scheduler so that it
      reloads the entire event list. Add check for existing experiment, and
      that the experiment is either active or swapping (do not want to start
      a scheduler for a swapped out experiment!). Add check to see if there
      are any events, and skip startup if there are not events in the DB.
      Lastly, get very serious about preventing more than one scheduler from
      being started, either by accident or intentionally. My protocol is to
      lock the table, grab and set the pid to -pid, test the pid for a
      positive value, and if positive, send the scheduler a kill(TERM) so
      that it can cleanup, clear the pid to zero in the DB, and exit. This
      approach ensures that we do not try to send a kill to a pid that is no
      longer active or owned by the user (this last part is not really
      necessary cause of how pids are reused, but it was easy to add so why
      not).
      
      exports_setup.in: Trivial change to make it easier to turn this on
      temporarily in devel trees.
      named_setup.in: Ditto.
      
      node_reboot.in: Add call to TBdbfork() in child cause of apparent DB
      connection problems across forks. In the child, set the eventstatus
      for the node to REBOOT if successful (not this event status stuff is
      temporary, will be recast in next set of revisions).
      
      GNUmakefile:  Add new controlling program, eventsys_control.
      power.in:     Ditto previous comment about REBOOT.
      os_setup.in:  Non event system cleanups.
      tbend.in:     Add DB cleanup of the new virt_trafgens and eventlist tables.
      tbprerun.in:  Ditto.
      tbreport.in:  Print out the event list in a pretty print format.
      tbswapin.in:  Add call to start the event system. Also a big fix; move
                    the named script up above the os_setup so that the named
                    tables have been updated by the time the first node
                    reboots. I noticed that nodes were failing on gethostbyname().
      tbswapout.in: Add call to stop the event system.
      0318cc22
  25. 12 Feb, 2002 1 commit
  26. 08 Feb, 2002 1 commit
  27. 16 Jan, 2002 1 commit
  28. 07 Jan, 2002 1 commit
  29. 26 Dec, 2001 1 commit
    • Leigh B. Stoller's avatar
      A bunch o' account managment script schanges. I have reworked · 46068860
      Leigh B. Stoller authored
      mkprojdir, mkacct-cntrl, mkgroup, and group-update into a set of new
      scripts that are more specific to their intended operation, and strive
      to do less work.
      
      1. mkacct - Replaces mkacct-cntrl. This script no longer does any
         group stuff. All it does is create new accounts, or update the
         password and gecos fields of existing accounts. Usage is the same
         as it was: "mkacct <userid>", and is typically invoked from the web
         interface via the approveuser form.
      
      2. mkgroup - Replaces group-update. This script creates new groups,
         either for the main project when it is approved, or for subgroup
         creation. This script does not alter the group membership. Usage
         is typically from the web interface, but mkgroup can be invoked
         from the command line: "mkgroup [-b | -a] <pid> <gid>" where -b
         puts it in the background and sends email later, while -a just
         captures the log and emails. This "audit" feature is going to find
         its way into more scripts as soon as I figure out a neat and clean
         perl mechanism to make it easy.
      
      3. setgroups - Replaces group-update. This script modifies the group
         membership of either specific users, or all the users in a
         project. It is typically invoked from the web interface when a
         project leader edits the subgroup membership or when a user is
         first approved to a project or subgroup. Command line usage is:
      
      	setgroups [-b | -a] -p <pid> [user ...]
              setgroups [-b | -a] [user ...]\n
      
         The first form is mostly a means to speed things up. The web
         interfaces knows exactly what users have need to be changed, but a
         global project update is nice too.
      
      4. mkproj - Replaces mkprojdir. Actually, mkproj still has all that
         directory code, but it also handles creating the groups and the
         account for the project leader. Part of my policy to move as much
         random code out of the web interface and into the PERL backend
         where it belongs.
      46068860
  30. 05 Nov, 2001 1 commit
    • Leigh B. Stoller's avatar
      Changes to node control (web page). Added a backend script to do this · f9cfddd4
      Leigh B. Stoller authored
      stuff so that the web page did not need to do anything except display
      and form processing. Add tbsetup/node_control for backend so that it
      can be called from the command line too. The virt_nodes table is also
      updated (for those values that have virt_nodes equivalents), and this
      mostly implies that changes can be applied only to swapped in
      experiments since we use the reserved table to map pcXXX to its vname
      so that the virt_nodes table can be updated. It is an easy extension
      to allow changes based on the pid/eid/vname, but I do not see a reason
      to support this ability yet. Note usage:
      
          Usage: node_control name=value [name=value ...] node [node ...]
                 node_control -e pid,eid name=value [name=value ...]
                 node_control -l
          For multiword values, use name='word0 ... wordN'
          Use -l to get a list of operational parameters you can change.
          Use -e to change parameters of all nodes in an experiment.
      
          {824} stoller$ /build/testbed/install//bin/node_control -l
            next_boot_osid            - (administrators only)
            startup_command
            bios_version              - (administrators only)
            rpms                      - (multiple options allowed)
            default_boot_cmdline
            default_boot_path
            default_boot_osid
            next_pxe_boot_path        - (administrators only)
            tarfiles                  - (multiple options allowed)
            pxe_boot_path             - (administrators only)
            next_boot_cmdline         - (administrators only)
            deltas                    - (multiple options allowed)
            next_boot_path            - (administrators only)
      f9cfddd4
  31. 31 Oct, 2001 1 commit
    • Robert Ricci's avatar
      Major overhaul of snmpit. Highlights, in no particular order: · 7e53c10a
      Robert Ricci authored
      Now supports multiple switches and multiple stacks. To do this, the existing
      snmpit_cisco module had to be modified to behave as a true object, and its
      interface changed.
      
      A new layer of abstraction has been added: the stack. This is to hide the
      details of how things such as VLAN creation occur across multiple devices. For
      example, in Cisco stacks, you always contact the stack leader (VTP server) to
      create/delete VLANs. Other switches may have different semantics, such as
      having to contact every switch to create the VLAN.
      
      Now uses libdb for database access and permissions checks.
      
      Hardware details are hidden as much as possible in the user interface. For
      example, the creation and deletion commands now take VLAN identifiers, and
      snmpit transparently turns these into device-specific VLAN numbers.
      
      snmpit.in has been re-written from scratch. The new version uses three basic
      steps:
      1) Process command line options and determine operation to run
      2) Determine which devices, ports, and VLANs will be involved and make
         the appropriate objects
      3) Actually perform the operation
         when TESTMODE is set, does only steps 1 and 2
      
      Some command-line options have changed. This is because we now use getopt,
      rather than a home-grown parser, to parse the command line. As a result of the
      large number of options, and an attempt to mimic old options as much as
      possible, the options are no longer very mnemonic.
      
      Uses a new table called switch_stacks to figure out which switches belong to
      which stacks. A stack is defined as a set of switches that share VLANs.
      
      All snmpit scripts and modules now run with 'use strict' to help catch certain
      programming errors.
      
      VLAN listing now prints out the pid/eid and vname for VLANs, if possible.
      
      A few things have bitrotted due to these changes:
      * snmpit_intel will need to be re-tooled to use the new interface, and to
        behave as a proper object
      * vlansync, vlandiff, and resetvlans depend on the output of snmpit, and will
        need to be updated to understand its new output format
      7e53c10a
  32. 24 Oct, 2001 1 commit
    • Leigh B. Stoller's avatar
      Add swappable and priority bits to experiment creation form. Not used, · 28c1968f
      Leigh B. Stoller authored
      but simply entered into the DB record for the experiment until we know
      what to do with them. Add to batchexp script arguments, since all that
      stuff is done outside the web interface. Add a swapexp perl script to
      swap an an experiment in/out form the command line. Add web links on
      the Experiment Information page to do this from the web interface. A
      bunch of locking changes. Previously expt_terminating in the
      experiment record prevented multiple calls to terminate an experiment,
      but now we have a more general locking problem with
      start,swapin,swapout, and terminate, so change expt_terminating to
      expt_locked (still a datetime field) and add locking to all of
      startexp, swapexp, and endexp. Note that batch experiments cannot be
      swapped yet because of locking issues still to be resolved. Minor
      cleanup in tbreport to make email message look better.
      28c1968f
  33. 17 Oct, 2001 1 commit
    • Leigh B. Stoller's avatar
      Rework of the batch experiment code. Unified it with the immediate · 4d420b21
      Leigh B. Stoller authored
      experiment code. No longer uses another table. Rather, the experiment
      record contains a couple of extra fields for the batch system. Also
      combined some of the backend code (no longer a killbatch script).
      Also added scriptable experiments; the batchexp program in the bin
      directory can start an experiment from the command line, and in fact
      is used from the web page for both batch experiments and immediate
      experiments (-i option). All of the DB code that was in the web
      interfaces was moved to batchexp.
      4d420b21
  34. 16 Oct, 2001 1 commit
  35. 21 Sep, 2001 1 commit
  36. 19 Sep, 2001 1 commit
  37. 14 Sep, 2001 1 commit
  38. 13 Sep, 2001 1 commit
    • Robert Ricci's avatar
      New script: frisbeelauncher · b26a78d3
      Robert Ricci authored
      Manages the launching of new frisbee servers, and recording the
      addresses the use in the database. If called for an image that is
      already associated with a running server, exits quitely. Otherwise,
      registers the new server's address and goes into the background, waiting
      for the frisbee server to die so that it can unregister the address.
      b26a78d3
  39. 30 Aug, 2001 1 commit
  40. 14 Aug, 2001 1 commit