1. 12 Jun, 2014 1 commit
    • Kirk Webb's avatar
      Update the use of realpath across all perl scripts · 3f167217
      Kirk Webb authored
      Change to use the realpath function in the 'Cwd' module instead of
      calling realpath via the shell.  The shell command varies in its
      reaction to a missing final path component.  On some platforms (Linux,
      FBSD10+) realpath reports an error if the final component doesn't exist
      on the filesystem.  On others (FBSD < 10), it does not report an error.
      
      The perl function from 'Cwd' emulates the same behavior as FBSD prior to
      version 10, which is the behavior the scripts expect.
      
      From here on out, instead of using `realpath`, do the following:
      
      use Cwd qw(realpath);
      ..
      ..
      my $realpath = realpath($somepath);
      3f167217
  2. 24 Sep, 2012 1 commit
    • Eric Eide's avatar
      Replace license symbols with {{{ }}}-enclosed license blocks. · 6df609a9
      Eric Eide authored
      This commit is intended to makes the license status of Emulab and
      ProtoGENI source files more clear.  It replaces license symbols like
      "EMULAB-COPYRIGHT" and "GENIPUBLIC-COPYRIGHT" with {{{ }}}-delimited
      blocks that contain actual license statements.
      
      This change was driven by the fact that today, most people acquire and
      track Emulab and ProtoGENI sources via git.
      
      Before the Emulab source code was kept in git, the Flux Research Group
      at the University of Utah would roll distributions by making tar
      files.  As part of that process, the Flux Group would replace the
      license symbols in the source files with actual license statements.
      
      When the Flux Group moved to git, people outside of the group started
      to see the source files with the "unexpanded" symbols.  This meant
      that people acquired source files without actual license statements in
      them.  All the relevant files had Utah *copyright* statements in them,
      but without the expanded *license* statements, the licensing status of
      the source files was unclear.
      
      This commit is intended to clear up that confusion.
      
      Most Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the Affero GNU General Public License, version 3
      (AGPLv3).
      
      Most Utah-copyrighted files related to ProtoGENI are distributed under
      the terms of the GENI Public License, which is a BSD-like open-source
      license.
      
      Some Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the GNU Lesser General Public License, version 2.1
      (LGPL).
      6df609a9
  3. 26 Nov, 2007 1 commit
  4. 05 Oct, 2007 1 commit
  5. 21 Sep, 2007 5 commits
  6. 06 Aug, 2007 1 commit
  7. 31 Jul, 2007 1 commit
  8. 30 Jul, 2007 1 commit
  9. 27 Jul, 2007 1 commit
    • Leigh Stoller's avatar
      Some fixes to deal with older templates that do not have a CVS repo. · f2888e91
      Leigh Stoller authored
      On modify, create the repo, but add checks to make sure that we do not
      bother with operations on branches that do not exist cause they
      predate the repo creation. This allows you to move forward after a
      modifying an existing template. Also add checks for instantiating a
      old template that has no repo at all cause it has not been modified since
      adding the repo support.
      
      A few other fixes to make sure that instances are cleaned up after errors.
      f2888e91
  10. 16 Jul, 2007 1 commit
    • Leigh Stoller's avatar
      The CVS repo will now have two subdirs, one called "setup" which is · 1aaa383c
      Leigh Stoller authored
      where the current stuff goes (datastore, nsfile, etc.). The other
      subdir is called "records" and will be populated with stuff that we
      currently put into the archive (the contents of the experiment
      directory).
      
      There is a record for each run, currently named XXX,YY where XXX is
      the instance ID and YY is the run number. I plan to add an XML file to
      map these to the symbolic names, but these are not required to be
      unique, which is why the directories are not named with them.
      1aaa383c
  11. 10 Jul, 2007 1 commit
    • Leigh Stoller's avatar
      Changes to switch from using tag to rtag. Note that this commit requires · 7a2ef6f1
      Leigh Stoller authored
      a locally modifed version of CVS that does a couple of extra things. The
      hacks are quite simple and currently on users. Briefly, there is a new
      config file option to specify a program to run when the tag operation is
      complete (similar to a module hook for rtag), and in tag.c I run that hook.
      
      Check out a sandbox as before:
      
        cvs -d ops.emulab.net:/proj/$pid/templates/XXXXX/cvsrepo rtag mytag XXXXX
      
      To create a new template (along the trunk), use the tag operation instead:
      
      	cd sandbox
      	cvs tag mtag
      
      and what for the email that says the template is created. You can
      continue to work along the trunk in this manner, although note that
      the .template file is changing (by the backend commit), and you might
      find it less distriacting to do a cvs update each time.
      
      To work along a branch:
      
      	cd sandbox
      	cvs tag -r existing_tag -b newtag1
              cvs update -r newtag
              make changes and commits
      	cvs tag newtag2
      
      When working along branched you will want to do a cvs update to get
      the .template file in sync.
      7a2ef6f1
  12. 09 Jul, 2007 1 commit
    • Leigh Stoller's avatar
      Checkpoint my cvs interface to the workbench. This first cut uses the · 8371fc79
      Leigh Stoller authored
      "rtag" directive to initiate template modify operations. So, to get started
      you do a checkout:
      
        cvs -d ops.emulab.net:/proj/$pid/templates/XXXXX/cvsrepo checkout XXXXX
      
      where XXXXX is the part of the guid (10000/1) before the slash. Might try
      and roll all templates into a single project wide repo at some point, to
      avoid the extraneous path stuff, but didn't want to worry that just yet.
      
      Okay, so have a checkout. You can work along the trunk, doing commits. To
      create a new template (a modify of the existing template), you tag the tree
      using rtag:
      
        cvs -d ops.emulab.net:/proj/$pid/templates/XXXXX/cvsrepo rtag mytag XXXXX
      
      A template modify is started at the end, and you should probably wait for
      email before continuing. Eventually I will need to add locking of some
      kind, but I have to do the modify in the background, or else I get deadlock
      cause cvs keeps the repo locked, and the modify also needs to access it.
      
      Each time you tag along the trunk, you get a modified template, which in
      the history diagram looks like:
      
        10000/1 --> 10000/2 --> 10000/3 ...
      
      If you want to branch, say at 10000/2 you can create a branch tag using rtag:
      
        cvs -d [cut] rtag -r T10000/2 -b mytag2 XXXXX
      
      You can also use your own tags for -r option, but I also create a TXXXXX/YY
      tag at each template modify, which is easy to remember.
      
      Then update your sandbox to the new branch, commit changes along that
      branch, and then later use rtag again to initiate a template modify
      operation:
      
        cvs update -r mytag2
        cvs commit ...
        cvs -d [cut] rtag -r mytag2 mytag3 XXXXX
      
      And now the history diagram looks like:
      
        10000/1 --> 10000/2 --> 10000/3 ...
                      |
                      |
                      -> 10000/4 ...
      
      You should be able to mix interaction via the web with interaction via the
      cvs interface. I've tested it, although not extensively.
      8371fc79
  13. 23 May, 2007 1 commit
    • Leigh Stoller's avatar
      First cut at template checkout and commit from a checkout. The interface · b674bc7b
      Leigh Stoller authored
      described is the one exported to ops via the XMLRPC interface. This is
      just playing aroundl no doubt this stuff is going to change.
      
      * template_checkout guid/vers
      
        Checkout a copy of the template to the current working directory.
      
      * template_commit
      
        Modify the previous template checkout, using the nsfile contained in
        the tbdata directory (subdir of the current directory). In other words,
        the current template is modified, creating a new template in the
        current working directory (the current directory refers to the new
        template).
      
        The datastore subdir is imported into the new template, but that is
        the only directory that is imported at present. Might change that.
      
      So this sounds much cooler then it really is. Why?
      
      * This only works from ops.
      
      * The "current directory" must be one of the standard approved directories
        (/proj, /users, /groups).
      
      * Cause, boss reads and writes that directory via NFS, as told to it
        by the xmlrpc client.
      
      At some point in the future it would be nice to support something
      fancier, using a custom transport, but lets see how this goes.
      b674bc7b
  14. 07 May, 2007 1 commit
    • Leigh Stoller's avatar
      Mostly this commit is the switch from SVN archives to ZIP archives. · 55d1bb6e
      Leigh Stoller authored
      Other stuff leaked in too ...
      
      I did separate out a lot of tbsetup/libArchive into db/Archive, and
      whats left in libArchive.pm will eventually move over into the
      Template library.
      
      Note that I have dropped archiving of plain experiments; this is not
      really owrth it outside the workbench context, and it just wastes
      space and makes a lot if stuff painful in the web interface.
      55d1bb6e
  15. 08 Mar, 2007 1 commit
  16. 06 Mar, 2007 1 commit
  17. 14 Feb, 2007 3 commits
  18. 17 Jan, 2007 1 commit
  19. 09 Jan, 2007 1 commit
  20. 08 Dec, 2006 1 commit
    • Leigh Stoller's avatar
      As discussed in meetings and email ... this commit changes what is · b898a8cc
      Leigh Stoller authored
      archived.  Rather then a special "archive" directory in the experiment
      directory, we know archive the entire experiment directory.
      
      This change should be backwards compatable, but let me know if not.
      
      Note that the nsdata directory is gone; the nsfile comes from the
      tbdata, but I know place a copy in nsfile.ns so that the name is well
      known.
      b898a8cc
  21. 06 Nov, 2006 1 commit
    • Kevin Atkinson's avatar
      libaudit related changes: · e89ee617
      Kevin Atkinson authored
        - Added "LIBAUDIT_FANCY" option to AuditStart.  When this option is
          used libaudit will send a different email than it normally sends,
          and on error call tblog_find_error() to determine the error.
      
        - Also add audit function AddAuditInfo which adds add additional
          information for libaudit to use in SendAuditMail when AUDIT_FANCY
          is set.
      
        - Modify template_swapin, template_instantiate, and template_create
          to use the new audit functionality.
      
        - Suppressing calling tblog_find_error and sending the error email
          when auditing in swapexp and batchexp
      
      tblog changes:
      
        - Shorten the message sent to the user when the error in unknown.
          Remove all parts about lack of free nodes as it no longer really
          applies as tblog now correctly identified those errors and handles
          them separately.  The message is now just "Please look at the log
          below to see what happened."
      
        - Improve algo. used to determine the other error when canceled.
          Will now work by removing all errors related to the cancel request
          and the essentially rerunning tblog_find_error.  If the cause of
          the error is still canceled, repeat and try again until the cause
          is something other than canceled or no errors are left.
      
        - Refactor tblog_find_error, which involves creating new internal
          functions: tblog_determine_single_error, tblog_store_error,
          tblog_dump_error
      
        - Add section on Primary vs Secondary Errors to the inline POD
          documentation.
      
        - Other minor enhancements and bug fixes.
      e89ee617
  22. 20 Oct, 2006 1 commit
    • Mike Hibler's avatar
      Wow, this should make me look important! · afa5e919
      Mike Hibler authored
      Two-day boondoggle to support "/scratch", an optional large, shared filesystem
      for users.  To do this, I needed to find all the instances where /proj is used
      and behave accordingly.  The boondoggle part was the decision to gather up all
      the hardwired instances of shared directory names ("/proj", "/users", etc.)
      so that they are set in a common place (via unexposed configure variables).
      This is a boondoggle because:
      
      1. I didn't change the client-side scripts.  They need a different mechanism
         (e.g., tmcd) to get the info, configure is the wrong way.
      
      2. Even if I had done #1 it is likely--no, certain--that something would
         fail if you tried to rename "/proj" to be "/mike".  These names are just
         too ingrained.
      
      3. We may not even use "/scratch" as it turns out.
      
      Note, I also didn't fix any of the .html documentation.  Anyway, it is done.
      To maintain my illusion in the future you should:
      
      1. Have perl scripts include "use libtestbed" and use the defined PROJROOT(),
         et.al. functions where possible.  If not possible, make sure they run
         through configure and use @PROJROOT_DIR@, etc.
      
      2. Use the configure method for python, C, php and other languages.
      
      3. There are perl (TBValidUserDir) and php (VALIDUSERPATH) functions which
         you should call to determine if an NS, template parameter, tarball or
         other file are in "an acceptable location."  Use these functions where
         possible.  They know about the optional "scratch" filesystem.  Note that
         the perl function is over-engineered to handles cases that don't occur
         in nature.
      afa5e919
  23. 18 Oct, 2006 1 commit
  24. 05 Sep, 2006 1 commit
    • Leigh Stoller's avatar
      A bunch of template changes resulting from meetings last week. · 087dbfff
      Leigh Stoller authored
      * Add XMLRPC interface for template swapin,stoprun,startrun,swapout and
        add the appropriate wrappers to the script_wrapper on ops.
      
      * Allow parameter descriptions in NS files. This is probably not in its
        final form since its a bit confusing as to what has priority; something
        in the NS file or a metadata item. Anyway, you can do this in your NS
        file:
      
      	$ns define-template-parameter GUID "0/0" "The GUID to be analyzed"
      
        The rules are currently that the NS file description has priority and
        is copied to child templates, unless the user has modified a description
        via the web interface, in which case the NS file description is ignored.
        I know, sounds awful, but for the most part people are going to use the
        NS file anyway.
      
      * Add "clear" option when starting a new experiment run; the per
        experiment DB at the logholes are cleared. Note that this is *not* the
        default behaviour; you have to either check the checkbox on the web form
        or use the -c option to the script wrapper, or clear=yes if talking
        directly to the XMLRPC server.
      
      * Fix up how email is generated for template_swapin and template_create,
        so that Kevin can debug tblog/tbreport stuff, but also so that we maintain
        mail logs as before. I have made some improvements to libaudit so as to
        centralize the mail goo, and avoid duplicating all that stuff.
      
      * Minor fixes to the program agent so that the new environment strings are
        sent before the program agent exits and reloads them!
      
      * Other minor little things.
      087dbfff
  25. 31 Aug, 2006 1 commit
    • Leigh Stoller's avatar
      * Finish up the Commit From Template support. · 3327ba01
      Leigh Stoller authored
      * Export the above via the XMLRPC interface and add a wrapper function
        to the script_wrapper. This allows you do to this on ops:
      
      	cd /proj/testbed/templates/10023/1
              Edit some files
              template_commit
      
        Which creates a new template, using the current directory to infer
        the template. Otherwise, provide the template GUID on the command line.
        Hmm, maybe this should be called template_modify? Either way, the
        name does not quite match
      
      * Export template_export via the XMLRPC wrapper. This allows you to
        export a template (instance) record from the command line on ops.
      
      
      	cd /proj/testbed/templates/10023/1
              template_export -i 12
              Exported to /proj/testbed/export/10000/3/12
      
        Which exports the template record for instance number 12. Again, the
        GUID is infered, but you can specify one on the command line. The export
        directory is printed so you know where it went. Note that export does
        *not* populate a DB on ops with the old DB data.
      3327ba01
  26. 28 Jul, 2006 1 commit
    • Leigh Stoller's avatar
      Add a "Create Template from Instance" ability. Basically, you can · a651da71
      Leigh Stoller authored
      create a new template (well, really a modify) from the current
      swapped in experiment. This allows you to create a template, swap in
      an instance, modify the datastore in the instance (which is a copy
      of the datastore in the template), and then create a new template
      using the datastore and nsfile from the instance. This is a new menu
      item on the showexp page for the instance.
      
      Also in this commit are fixes and improvements to the new navagation
      bar that I recently added.
      a651da71
  27. 14 Jun, 2006 1 commit
    • Leigh Stoller's avatar
      The template "datastore" ... · fe9aa6a4
      Leigh Stoller authored
      Each template has a datastore, which is really just a subdirectory that can
      be populated with files, and committed to the subversion archive.  Note,
      the datastore os specific to the template itself. The Template Archive link
      on the Show Template page takes you to the subdirectory, which by
      convention I am calling "datastore".
      
      The directory actually lives in /proj/pid/exp/eid/TGUID-VERS ... but that
      path is printed out for you on the archive page.
      
      Anyway, put stuff in the datastore directory, and then commit the template
      archive so there is a tag associated with it.
      
      When an instance is created, a checkout of the datastore is placed in the
      experiment directory (/proj/pid/eid/exp/template_datastore). The current
      tag (from above) is stored with the instance so that we can later recreate
      the enviroment for the instance, say for rerun.
      
      Tarfiles and rpms in the datastore can be referenced as xxx://foo.rpm (in
      your NS file).  tarfiles_setup transforms those when the instance is
      swapped in, sorta like it does other URLs, only it does not actually fetch
      them, just need to rewrite the paths so they reference datastore.
      
      The program agent gets another environment variable so you can refer to the
      datastore without hardwiring paths ($DATASTORE). Eventually I want to move
      the checkout someplace else, but it was easy to drop it into the experiment
      directory for now.
      fe9aa6a4
  28. 06 Jun, 2006 1 commit
  29. 22 May, 2006 1 commit
  30. 18 May, 2006 1 commit
    • Leigh Stoller's avatar
      Address a number of issues raised by Mike. The most notable: · 4d663bb8
      Leigh Stoller authored
      * Rework metadata to be somewhat more general so that they can be used for
        things like parameter descriptions.
      
      * My own little part of javascript hell ... add a highlight around the
        "current" template in the template graph. Sheesh!
      
      * Add more tooltips (using the tooltip library). When you mouseover the
        metadata or descriptions, the formatted text is shown in a tooltip,
        which is handy when the valus is truncated cause its too long for the
        tables.
      4d663bb8
  31. 16 May, 2006 1 commit
  32. 12 May, 2006 1 commit
    • Leigh Stoller's avatar
      Redo the entire template library. I've been meaning to use perl · 78503406
      Leigh Stoller authored
      "object" and this was a good opportunity to see if they are useful and
      easy enough to use. Yep they are; the code is much cleaner with many
      fewer utility functions to get at stuff. I recommend this approach
      from now on.
      
      The problem is the php side, which ends up duplicating some stuff, but
      in the old style. This is not so bad for the template code since I
      have made it a point not to do anything but display functions in php;
      all modifications are handled in the backend.
      78503406
  33. 09 May, 2006 1 commit
  34. 05 May, 2006 1 commit