1. 24 Feb, 2002 1 commit
  2. 21 Feb, 2002 1 commit
    • Leigh Stoller's avatar
      Some whacking of the event system. I have implemented the addressing · 8305021f
      Leigh Stoller authored
      scheme that we discussed in email. Notifications and subscriptions now
      take an "address_tuple" argument (I know, crappy name) that is a
      structure that looks like this:
      
      	char		*site;		/* Which Emulab site. God only */
      	char		*expt;		/* Project and experiment IDs */
      	char		*group;		/* User defined group of nodes */
      	char		*host;		/* A specific host */
      	char		*objtype;	/* LINK, TRAFGEN, etc ... */
              char		*objname;	/* link0, cbr0, cbr1, etc ... */
              char		*eventtype;	/* START, STOP, UP, DOWN, etc ... */
      
      These can be a specific value, ADDRESSTUPLE_ANY if you are a
      subscriber, or ADDRESSTUPLE_ALL if you are a producer. The reason for
      the distinction is that you can optimize the match expression with the
      extra bit of information, and the above structure can make for a
      fairly lengthy match expression, which takes more time of course.
      You should use address_tuple_alloc() and address_tuple_free() rather
      than allocating them yourself. Note that host above is actually the
      ipaddr of control interface. This turns out to be more convenient
      since free nodes do not have virtual names.
      
      Also added a new tbgen directly. This directory includes 3 programs in
      the making:
      
      tbmevd: Is the Testbed Master Event Daemon, to be run on boss and will
      handle TBCONTROL events (reboot, reload, etc). It is just a shell of a
      program right now, that takes the events but does not do anything
      useful with them. Have not defined what the events are, and what DB
      state will be modified.
      
      tbmevc: Is the Testbed Master Event Client (akin to tmcc). It
      generates TBCONTROL events which the tbmevd will pick up and do
      something useful with. This program is intended to be wrapped by a
      perl script that will ask the tmcd for the name of the boss (running
      the event daemon).
      
      sample-client: This is a little client to demonstrate how to connect
      to the event system and use the address tuple to subscribe to events,
      and then how to get information out of notifications.
      
      Note that I have not created a proper build environment yet, so new
      programs should probably go in the event dir for now, and link using
      the same approach as in tbgen/GNUmakefile.in.
      8305021f
  3. 19 Feb, 2002 2 commits
  4. 14 Feb, 2002 1 commit
    • Leigh Stoller's avatar
      Respond to Shashi's message that users can cause the parser to go into · e45c4905
      Leigh Stoller authored
      an infinite loop rather easily via the NS file TCL hooks. Added a
      perl wrapper around parse.tcl called parse-ns, which forks a child to
      run the parser. The parser is invoked "nice +10" and the CPU limit for
      the child is set to 60 seconds, which should be enough for any parse.
      If the limit is exceeded, send email to tbops since this indicates a
      big problem or a user being dumb/malicious.
      e45c4905
  5. 12 Feb, 2002 1 commit
  6. 11 Feb, 2002 1 commit
  7. 08 Feb, 2002 2 commits
    • Leigh Stoller's avatar
      Kill of savevlans since its simply a snapshot of DB state, and not · c8c2b569
      Leigh Stoller authored
      very useful by itself anyway.
      c8c2b569
    • 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
  8. 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
  9. 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
  10. 18 Jan, 2002 3 commits
  11. 09 Jan, 2002 1 commit
  12. 08 Jan, 2002 1 commit
  13. 07 Jan, 2002 1 commit
    • Leigh Stoller's avatar
      Checkpoint first working version of Frisbee Redux. This version · 86efdd9e
      Leigh Stoller authored
      requires the linux threads package to give us kernel level pthreads.
      
      From: Leigh Stoller <stoller@fast.cs.utah.edu>
      To: Testbed Operations <testbed-ops@fast.cs.utah.edu>
      Cc: Jay Lepreau <lepreau@cs.utah.edu>
      Subject: Frisbee Redux
      Date: Mon, 7 Jan 2002 12:03:56 -0800
      
      Server:
      The server is multithreaded. One thread takes in requests from the
      clients, and adds the request to a work queue. The other thread processes
      the work queue in fifo order, spitting out the desrired block ranges. A
      request is a chunk/block/blockcount tuple, and most of the time the clients
      are requesting complete 1MB chunks. The exception of course is when
      individual blocks are lost, in which case the clients request just those
      subranges.  The server it totally asynchronous; It maintains a list of who
      is "connected", but thats just to make sure we can time the server out
      after a suitable inactive time. The server really only cares about the work
      queue; As long as the queue si non empty, it spits out data.
      
      Client:
      The client is also multithreaded. One thread receives data packets and
      stuffs them in a chunkbuffer data structure. This thread also request more
      data, either to complete chunks with missing blocks, or to request new
      chunks. Each client can read ahead up 2 chunks, although with multiple
      clients it might actually be much further ahead as it also receives chunks
      that other clients requested. I set the number of chunk buffers to 16,
      although this is probably unnecessary as I will explain below. The other
      thread waits for chunkbuffers to be marked complete, and then invokes the
      imagunzip code on that chunk. Meanwhile, the other thread is busily getting
      more data and requesting/reading ahread, so that by the time the unzip is
      done, there is another chunk to unzip. In practice, the main thread never
      goes idle after the first chunk is received; there is always a ready chunk
      for it. Perfect overlap of I/O! In order to prevent the clients from
      getting overly synchronized (and causing all the clients to wait until the
      last client is done!), each client randomizes it block request order. This
      why we can retain the original frisbee name; clients end up catching random
      blocks flung out from the server until it has all the blocks.
      
      Performance:
      The single node speed is about 180 seconds for our current full image.
      Frisbee V1 compares at about 210 seconds. The two node speed was 181 and
      174 seconds. The amount of CPU used for the two node run ranged from 1% to
      4%, typically averaging about 2% while I watched it with "top."
      
      The main problem on the server side is how to keep boss (1GHZ with a Gbit
      ethernet) from spitting out packets so fast that 1/2 of them get dropped. I
      eventually settled on a static 1ms delay every 64K of packets sent. Nothing
      to be proud of, but it works.
      
      As mentioned above, the number of chunk buffers is 16, although only a few
      of them are used in practice. The reason is that the network transfer speed
      is perhaps 10 times faster than the decompression and raw device write
      speed. To know for sure, I would have to figure out the per byte transfer
      rate for 350 MBs via network, via the time to decompress and write the
      1.2GB of data to the raw disk. With such a big difference, its only
      necessary to ensure that you stay 1 or 2 chunks ahead, since you can
      request 10 chunks in the time it takes to write one of them.
      86efdd9e
  14. 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
  15. 03 Jan, 2002 1 commit
    • Robert Ricci's avatar
      Added our apache config file to CVS, in a continuing attempt to put everything · e0d19fbe
      Robert Ricci authored
      needed to build an emulab boss node in one convenient package.
      
      The config file gets run through autoconf to get the DocumentRoot, log, and
      other directories. There is an install target for it, but this is as yet
      unused by anything else. There is also a new configure option specifiying where
      the config file should go.
      e0d19fbe
  16. 26 Dec, 2001 1 commit
    • Leigh Stoller's avatar
      A bunch o' account managment script schanges. I have reworked · 46068860
      Leigh 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
  17. 03 Dec, 2001 1 commit
    • Leigh Stoller's avatar
      Checkpoint the visualization stuff. Rework Chad's stuff to match · e72c90a8
      Leigh Stoller authored
      current testbed software practices. Add a wrapper script to go from
      a pid/eid to the top file in the experiment directory. This means we
      cannot visualize experiments that are not active, but until we have a
      topfile generator that is independent of assign_wrapper, there is
      nothing to do about that. A makefile to install new tools. Also add a
      couple of web pages. The first web page spits out a page with an img
      tag which refers to another php script that generates the gif file
      with the backend tools, and stuff is out with an appropriate content
      header line. Very nifty.
      e72c90a8
  18. 05 Nov, 2001 1 commit
    • Leigh Stoller's avatar
      Changes to node control (web page). Added a backend script to do this · f9cfddd4
      Leigh 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
  19. 30 Oct, 2001 1 commit
  20. 29 Oct, 2001 1 commit
    • Leigh Stoller's avatar
      A bunch of lastlogin changes! The user and experiment information · 4658545e
      Leigh Stoller authored
      pages now show the lastlogin info that is gathered from sshd syslog
      reporting to users. That info is parsed by security/genlastlog.c, and
      entered into the DB in the nodeuidlastlogin and uidnodelastlogin
      tables. If not obvious from the names, for each user we want the last time
      they logged in anyplace, and for each node we want the last time anyone
      logged into it. The latter is obviously more useful for scheduling
      purposes. All of the various images have new /etc/syslog.conf files,
      and the 6.2 got new sshd_configs (all cvsup'ed with kill -HUP). There
      is an entry in boss:/etc/crontab and users:/etc/syslog.conf. All of
      this is decribed in greater detail in security/genlastlog.c.
      4658545e
  21. 24 Oct, 2001 2 commits
    • Leigh Stoller's avatar
    • Leigh Stoller's avatar
      Add swappable and priority bits to experiment creation form. Not used, · 28c1968f
      Leigh 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
  22. 20 Oct, 2001 1 commit
  23. 17 Oct, 2001 1 commit
    • Leigh Stoller's avatar
      Rework of the batch experiment code. Unified it with the immediate · 4d420b21
      Leigh 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
  24. 16 Oct, 2001 1 commit
  25. 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
  26. 27 Sep, 2001 1 commit
    • Robert Ricci's avatar
      Lib-ification. These scripts have been changed from using the Mysql module to · 4c11aa5d
      Robert Ricci authored
      using the libdb library. They have also been cleaned up somewhat, with more
      comments added, etc.
      
      I've merged nodeip and mac2if, which had very similar functions. The merged
      version goes under the name nodeip.
      
      Lastly, I've added some access checks to db2ns and node_status, to make sure
      they're only called by the right people.
      4c11aa5d
  27. 21 Sep, 2001 1 commit
  28. 19 Sep, 2001 1 commit
  29. 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
  30. 30 Aug, 2001 1 commit
  31. 20 Aug, 2001 1 commit
  32. 14 Aug, 2001 1 commit
  33. 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
  34. 31 Jul, 2001 1 commit
  35. 24 Jul, 2001 1 commit
    • Leigh Stoller's avatar
      Add new console_reset script to bulk reset all of the tip lines on · 4303838f
      Leigh Stoller authored
      plastic. Useful for when plastic reboots, although it needs to be
      run from paper of course. We should probably set up some kind of
      reboot utility for when plastic reboots, since when capture fires up,
      the "acl" files are all in the wrong group/mode. On the other hand,
      this shared file based permission scheme is going to end up changing
      anyway soon, since it won't work when the serial lines are on other
      machines. Will need a tip permserver at that point.
      4303838f