1. 08 Jan, 2004 1 commit
  2. 13 Dec, 2003 1 commit
  3. 01 Dec, 2003 1 commit
    • Robert Ricci's avatar
      New scripts: tarfiles_setup, fetchtar.proxy, and webtarfiles_setup . · c0c6547c
      Robert Ricci authored
      The idea is to give us hooks for grabbing experimenters' tarballs (and
      RPMs) from locations other than files on ops. Mainly, to remove
      another dependance on users having shells on ops.
      
      tarfiles_setup supports fetching files from http and ftp URLs right
      now, through wget. It places them into the experiment directory, so
      that they'll go away when the experiment is terminated, and the rest
      of the chain (ie. downloading to clients and os_setup's checks)
      remains unchaged.  It is now tarfiles_setup's job to copy tarballs and
      RPMs from the virt_nodes table to the nodes table for allocated nodes.
      This way, it can translate URLs into the local filenames it
      constructs. It get invoked from tbswap.
      
      Does the actual fetching over on ops, running as the user, with
      fetchtar.proxy.
      
      Should be idempotent, so we should be able to give the user a button
      to run webtarfiles_setup (none exists yet) yet to 'freshen' their
      tarballs. (We'd also have to somehow let the experiment's nodes know
      they need to re-fetch their tarballs.)
      
      One funny side effect of this is that the separator in
      virt_nodes.tarfiles is now ';' instead of ':' like nodes.tarballs,
      since we can now put URLs in the former. Making these consistent is a
      project for another day.
      c0c6547c
  4. 17 Nov, 2003 1 commit
    • Leigh B. Stoller's avatar
      Merge the two state machines (batchstate and state) into a single · 2025e0bd
      Leigh B. Stoller authored
      state machine (state). All of the stuff that was previously handled by
      using batchstate is now embedded into the one state machine. Of
      course, these mostly overlapped, so its not that much of a change,
      except that we also redid the machine, adding more states (for
      example, modify phases are now explicit. To get a picture of the
      actual state machine, on boss:
      
      		stategraph -o newstates EXPTSTATE
      		gv newstates.ps
      
      Things to note:
      
      * The "batchstate" slot of the experiments table is now used solely to
        provide a lock for batch daemon. A secondary change will be to
        change the slot name to something more appropriate, but it can
        happen anytime after this new stuff is installed.
      
      * I have left expt_locked for now, but another later change will be to remove
        expt_locked, and change it to active_busy or some such new state name in
        the state machine. I have removed most uses of expt_locked, except those
        that were necessary until there is a new state to replace it.
      
      * These new changes are an implementation of the new state machine,
        but I have not done anything fancy. Most of the code is the same as
        it was before.
      
      * I suspect that there are races with the batch daemon now, but they
        are going to be rare, and the end result is probably that a
        cancelation is delayed a little bit.
      2025e0bd
  5. 30 Sep, 2003 1 commit
    • Leigh B. Stoller's avatar
      Up to now we have had two state variables associated with an experiment, · 4269dad1
      Leigh B. Stoller authored
      plus a lock field. The lock field was a simple "experiment locked, go away"
      slot that is easy to use when you do not care about the actual state that
      an experiment is in, just that it is in "transition" and should not be
      messed with.
      
      The other two state variables are "state" and "batchstate". The former
      (state) is the original variable that Chris added, and was used by the tb*
      scripts to make sure that the experiment was in the state each particular
      script wanted them to be in. But over time (and with the addition of so
      much wrapper goo around them), "state" has leaked out all over the place to
      determine what operations on an experiment are allowed, and if/when it
      should be displayed in various web pages. There are a set of transition
      states in addition to the usual "active", "swapped", etc like "swapping"
      that make testing state a pain in the butt.
      
      I added the other state variable ("batchstate") when I did the batch
      system, obviously! It was intended as a wrapper state to control access to
      the batch queue, and to prevent batch experiments from being messed with
      except when it was really okay (for example, its okay to terminate a
      swapped out batch experiment, but not a swapped in batch experiment since
      that would confuse the batch daemon). There are fewer of these states, plus
      one additional state for "modifying" experiments.
      
      So what I have done is change the system to use "batchstate" for all
      experiments to control entry into the swap system, from the web interface,
      from the command line, and from the batch daemon. The other state variable
      still exists, and will be brutally pushed back under the surface until its
      just a vague memory, used only by the original tb* scripts. This will
      happen over time, and the "batchstate" variable will be renamed once I am
      convinced that this was the right thing to do and that my changes actually
      work as intended.
      
      Only people who have bothered to read this far will know that I also added
      the ability to cancel experiment swapin in progress. For that I am using
      the "canceled" flag (ah, this one was named properly from the start!), and
      I test that at various times in assign_wrapper and tbswap. A minor downside
      right now is that a canceled swapin looks too much like a failed swapin,
      and so tbops gets email about it. I'll fix that at some point (sometime
      after the boss complains).
      
      I also cleaned up various bits of code, replacing direct calls to exec
      with calls to the recently improved SUEXEC interface. This removes
      some cruft from each script that calls an external script.
      
      Cleaned up modifyexp.ph3 quite a bit, reformatting and indenting.
      Also fixed to not run the parser directly! This was very wrong; should
      call nscheck instead. Changed to use "nobody" group instead of group
      flux (made the same change in nscheck).
      
      There is a script in the sql directory called newstates.pl. It needs
      to be run to initialize the batchstate slot of the experiments table
      for all existing experiments.
      4269dad1
  6. 18 Sep, 2003 2 commits
  7. 27 Aug, 2003 1 commit
  8. 22 Aug, 2003 1 commit
  9. 06 Aug, 2003 1 commit
    • Leigh B. Stoller's avatar
      Clean up temporary files used in modify. The temp dirs were being · 05bd80ff
      Leigh B. Stoller authored
      created in /tmp and left behind. I've moved them to the expwork
      directory instead, and added a routine in the library to clear them
      out.
      
      Clear out the nsfile (stored in /tmp) used in modify. The web page was
      creating a temp file, but never removing it. swapexp now copies the
      nsfile in so that the web page can remove the temporary after the
      script exits. The temp is placed in the expwork directory as well, but
      left behind for debugging.
      
      When swapmod fails, send along the nsfile in the email message.
      05bd80ff
  10. 05 Aug, 2003 1 commit
  11. 30 Jul, 2003 1 commit
  12. 29 Jul, 2003 1 commit
  13. 25 Jul, 2003 1 commit
    • Leigh B. Stoller's avatar
      Commit my version of assign_wrapper as assign_wrapper-new, and change · 62e38deb
      Leigh B. Stoller authored
      tbswap to use this version inside the testbed project only! All other
      projects will see the old version for now; there are just too many
      things to test, and the testsuite gets just a fraction of them. Some
      highlights (which I will expand on later when I commit this version to
      the main version):
      
      * New -t option to create the TOP file, and then exit. The only other
        side effect of this is to update the min/max nodes for the
        experiment in the DB, unles new option -n (impotent mode) is given.
      
      * New -n option to operate in impotent mode; do not allocate nodes and
        do not modify the DB. Okay, so this option is not as great as it
        sounds. I eventually hit the point of diminishing returns, with
        trying to make things work right without DB modification. At some
        point I just throw in the towel and exit. This currently happens after
        interpolating the link results of assign. But, I have found it very
        useful, and could get better with time. Being able to run assign on
        the main DB without sucking up the nodes is nice for debugging.
      
      * Lots of data structure organization, mostly on the virtual topology
        side of assign (you can think of assign as two sections, the part
        that interprets the DB tables and creates the TOP file, and the part
        that reads the results of assign and sets up all the physical stuff
        in the DB). I removed numerous global hashes, and combined them into
        aggregate data structures, such as they are in Perl. My approach for
        this was to read the tables from the DB, and keep them handy,
        extending them as needed with stuff that assign_wrapper generates as
        it proceeds. This has the side effect of cutting down on the number
        of queries as well.
      
        The next task is to do the physical side reorg, but not up for that
        yet.
      62e38deb
  14. 17 Jul, 2003 1 commit
  15. 15 Jul, 2003 1 commit
    • Leigh B. Stoller's avatar
      A set of changes to make swapmod work on jailed nodes (note, swapmod · 92ff875a
      Leigh B. Stoller authored
      does not yet work with remove virtual nodes; that will take even more
      work).
      
      Added a new allocstate called RES_TEARDOWN. assign_wrapper no longer
      deallocates unused nodes, but rather moves them into the new state for
      the wrapper (tbswap) to deal with. Thats cause deleted vnodes need to
      be torn down, since its possible that the node on which they were
      living will not be deallocated (say, if there are other vnodes on
      it). We do not want to be doing that from assign_wrapper, so tbswap
      looks for those nodes.
      
      Made vnode_setup allocstate aware in the same way that os_setup is;
      do not reboot vnodes or try to set up vnodes when they are already in
      the RES_READY state, as they will be when doing a swapmod. In
      addition, if os_setup is going to reboot the underlying physnode, move
      the vnodes on that node into RES_READY too, since there they will
      setup automatically. Might need an interim state here, for correctness.
      92ff875a
  16. 11 Jun, 2003 1 commit
  17. 29 Apr, 2003 4 commits
    • Chad Barb's avatar
      · 40bc8389
      Chad Barb authored
      (hopefully) fixed bug in startexp
      affecting batch system by switching two cleanup checks.
      (I wasn't giving it an opportunity to bail on a batchexp failing
       soon enough.)
      
      Also, tidied up return code for tbswap.
      40bc8389
    • Chad Barb's avatar
      · 59d5e48f
      Chad Barb authored
      Don't reboot nodes when recovering from a failed assign during update.
      59d5e48f
    • Chad Barb's avatar
      · a3a818af
      Chad Barb authored
      Mask off '64' bit from return from assign_wrapper, so
      batch_exp doesn't choke on it.
      a3a818af
    • Chad Barb's avatar
      Robust Experiment Modify -and- · 7308f458
      Chad Barb authored
      Various Other changes to get Expt Modify ready for prime time.
      
       - If assign fails on a modify, experiment will
         be restored to old state, *not* swapped out.
      
       - Reboot option has been improved to reboot all
         nodes as part of os_setup, not in separate
         step.
      
       - Different assign error codes result in different
         retry behavior for assign_wrapper
         (Follow's Rob's change to assign to make it
          pass back special code for non-retriable faults)
      
       - '64' bit in assign_wrapper exit code indicates to tbswap
         that db/phys state hadn't been mucked with before
         the exit occurred
         (ergo, '65' and '1' are the common return codes,
          though the old 4,8,16,32 are still there for assign failing.)
      
       - (tbswap still returns codes from assign wrapper)
      
       - Added 5 sec pause between assign attempts.
      
       - Cleaned up tbswap code.
      
       - Physical state backup/restore removed from tbprerun,
         put into swapexp.
      
       - Interfaces table now getting cleaned up correctly
         (Mike noticed problem)
      
       - Changed menu display in showexp to show
         the "modify" menu option for swapped out experiments
         (like it used to.)
      
       - A couple other changes.
      
      Note:
       Still admin-only, but I plan to change that soon.
      
      To do:
       - Erase expt backups in /tmp after using them.
       - Re-viz failed experiments.
      7308f458
  18. 07 Apr, 2003 1 commit
    • Chad Barb's avatar
      · 99a867cb
      Chad Barb authored
      Modify os_setup return codes to enable "intelligent" retry;
      
      Now os_setup returns:
        0 on success
        1 on one or more retry-friendly errors
       -1 on no-retry errors
      
      tbswap.in checks os_setup's return code,
      and will only retry on 1.
      99a867cb
  19. 03 Apr, 2003 1 commit
    • Chad Barb's avatar
      · 765de560
      Chad Barb authored
      Added new feature 'Experiment Modify'.
      Now available (to admins only for now) from the showexp page.
      
      Warning! doing a modify which alters the topology will probably
      require a "reboot all nodes" afterwards.
      (There will be a checkbox soon in the modify experiment page.)
      
      Adding/removing delay nodes seems to work fine without reboots, though.
      
      Warning! If the new version of the experiment cannot be mapped
       (not enough nodes available, for instance) the experiment will be
       swapped out! This will get fixed later.
      
      Prerun backs up the experiment topology, so using a bad NS
      file doesn't result in experiment termination.
      
      As part of this, added library functions to libdb to
      delete, backup, and restore both virtual and physical experiment state.
      765de560
  20. 02 Apr, 2003 1 commit
  21. 27 Mar, 2003 1 commit
    • Chad Barb's avatar
      · a495bcfb
      Chad Barb authored
      New tbswap mode 'update'. (a.k.a. 'reswap')
      Re-assigns experiment, fixing already assigned nodes in place;
      tries not to reboot nodes. Doesn't clear port counters,
      restart event system, etc.
      
      A few more things remain to be considered for 'general' use
      adding new nodes to experiments and modifying topologies,
      but for replacing failed nodes in experiments
      or removing virt_nodes from experiments, should work fine.
      a495bcfb
  22. 24 Mar, 2003 1 commit
    • Chad Barb's avatar
      · dc12ae50
      Chad Barb authored
      Fixed bug where after running out of retry attempts,
      swapout was only doing the 'retry' version of cleanup,
      when it should have been doing a full cleanup.
      dc12ae50
  23. 20 Mar, 2003 2 commits
    • Chad Barb's avatar
      · 6a449d22
      Chad Barb authored
      tbswap: re-enabled retry (Undid leigh's last change)
      
      assign_wrapper.in:
         was left-joining reserved to nodes to get reserved list;
         This didn't get delays.
      
         now am doing separate query on reserved, and putting those
         into the %fixed and %alreadyAllocated hashes.
      6a449d22
    • Leigh B. Stoller's avatar
      c731d5e0
  24. 18 Mar, 2003 1 commit
    • Chad Barb's avatar
      · e928fbe9
      Chad Barb authored
      Here it is; reswap.
      
      nfree
         - modified to put node in FREE_DIRTY when it is freed
      
      assign_wrapper
         - '-u' update switch added.
      
      os_setup
         - doesn't reboot node which is already in RES_READY
      
      tbswap
         - calls all this stuff appropriately
      e928fbe9
  25. 07 Mar, 2003 2 commits
    • Chad Barb's avatar
      · 5de15b7c
      Chad Barb authored
      Still not fully tested, but seems to work.
      
      Fixed minor error.
      (When $TESTMODE == 1,
       swapped in experiment was incorrectly being put into ACTIVE
       after it was put into TESTING.)
      5de15b7c
    • Chad Barb's avatar
      · 2fd95aee
      Chad Barb authored
      NOT TESTED; NOT READY FOR PRIME TIME.
      Archived here for backup/review purposes.
      
      Initial version; unifies tbswapout and tbswapin into one
      script.
      
      Should be just like tbswapin/out except:
      tbswapin  foo bar => tbswap in  foo bar
      tbswapout foo bar => tbswap out foo bar
      
      The main win here is that doSwapin() is a function, as is doSwapout().
      If doSwapin() fails, actual doSwapout() code can be called.
      
      Also includes retry framework
      (functionalizing doSwapin and doSwapout makes retrying much cleaner.)
      2fd95aee