1. 15 Dec, 2003 1 commit
    • Leigh B. Stoller's avatar
      Commit functioning XML interface. At present, only isadmin people will · 51310e62
      Leigh B. Stoller authored
      see this new page. That allows me to inflict pain on testbed
      developers while we work out any kinks. These new pages implement an
      XML interface to experiment creation.
      Some new files:
      beginexp_html.php3: A wrapper for the actual beginexp form. This page
      includes the form, and then invokes the XMLRPC backend page.
      beginexp_form.html: The original form code, split out from beginexp
      and turned into a module that can be included into another file.  It
      is slightly reorganized to make it easier to include as a module.  The
      idea is that the plab_ez form will be recast in this model, reducing
      some redundant complexity.
      beginexp_xml.php3: The XML backend. The idea is that the html page
      packages up the form arguments as an XMLRPC message, and invokes this
      page with the XML goo encoded in the URL. It also passes along the
      uid/cookie so that the authentication happens properly (https of
      course). The page decodes the URL into PHP datatypes, and does much of
      the same argument checking that beginexp used to do. Errors are stored
      up in the same manner, but instead of spitting back html, it now spits
      back a "structure", encoded in XML so that the _html page can put up a
      new form. Basically, all output is sent back via an XML encoded
      structure and displayed in a form that the invoking script deems
      This gives us a pure XMLRPC interface, which we wrap with a form interface
      so that it looks just like it did before.
      The next step is to provide an alternate front end, but that will require
      some certificate stuff that I have not worked out yet.
      Oh, one more item. The syntax check stuff has been altered a bit.
      Instead of invoking the beginexp page, which meant a zillion special
      tests, I now invoke nscheck.php3 directly from the button. Took a few
      extra lines of Javascript to do this, so watch out for problems there
  2. 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.
  3. 24 Apr, 2003 1 commit
  4. 10 Jul, 2002 1 commit
  5. 07 Jul, 2002 1 commit
  6. 03 Dec, 2001 1 commit
  7. 21 May, 2001 1 commit
  8. 04 May, 2001 1 commit
  9. 18 Apr, 2001 1 commit
  10. 12 Apr, 2001 1 commit