1. 07 Mar, 2007 1 commit
  2. 06 Mar, 2007 4 commits
  3. 14 Feb, 2007 1 commit
  4. 13 Feb, 2007 1 commit
  5. 07 Feb, 2007 1 commit
    • David Johnson's avatar
      Python interface to db is now most of the way up to speed with · 5da05762
      David Johnson authored
      libdb.pm.in.  There's a nasty little hack to deal with forks, because the
      underlying python mysql db module does not help us deal with them.
      Basically, there is no way (and I mean no way!) to close a connection in
      the child without actually sending a disconnect to the server... so the
      parent's connection gets killed too.  The only way around this is to hack
      the Python C API wrapper that the mysql python module is built on.  For
      now, we just close off both connections before a fork via a TBDBPreFork(),
      and restore them implicitly on the first query after the fork.  It sucks,
      but it's the best we can do until hacking the mysql module.
      
      Anyway, the big fix is that testbed-ops no longer gets spammed with
      DBQuery failures; they are retried just like in libdb.pm.in.
      5da05762
  6. 23 Jan, 2007 1 commit
  7. 18 Jan, 2007 1 commit
    • Leigh Stoller's avatar
      Change how the archive stuff is presented in the template instance and · 808f43ec
      Leigh Stoller authored
      run display pages.
      
      * Add new code to archive_control and libarchive to create tags (in
        optional subdirs) of the tags directory. These tags are simply tags
        on the current trunk at the time.
      
      * Change to template instantiate and start/top run code to create a
        "runs" directory. Within the runs directory are subdirs named for
        each runid, and within this directory are start and stop run tags.
        Eventually add some other tags when doing swapmods, but do not have
        that figured out yet.
      
      * Change the viewcvs code to add an "embedded" view of an archive.
        This is just an alternate view that has no header/footer goo, but
        only the actual svn contents. The main reason for this change is
        that the header and footers take up a huge amount of space and
        contribute nothing. Smaller means its easier to add to the instance
        and run show pages.
      
      * Add the above mentioned embedded archive view to the instance and
        run show pages. On the instance page you see the directory of all
        runids, and on the show run page you see the subdir for that run.
      808f43ec
  8. 16 Jan, 2007 4 commits
    • Leigh Stoller's avatar
      10b59ad2
    • Leigh Stoller's avatar
      Make rule not quite clever enough. · 34d921d1
      Leigh Stoller authored
      34d921d1
    • Leigh Stoller's avatar
      Move the bulk (or guts) of newuser and newproject from the web · 16aaa101
      Leigh Stoller authored
      interface to the backend. There are new scripts that can be called
      from the command line:
      
      	newuser xmlfile
      	newproj xmlfile
      
      They both run from small xmlfiles that are generated by the web
      interface from the form data. I also moved user verification to the
      backend so that we do not have duplicated email functions, but that
      was a small change.
      
      Upon error, the xmlfile is saved and sent to tbops so that we can
      rerun the command by hand, rather then force user to fill out form
      again. I also do a better job of putting the form back up intact when
      there are internal errors.
      
      If the user provides an initial public key, that is put into the xml
      file as well and addpubkey is called from newuser instead of the web
      interface. A more general change to addpukey is that it is now
      *always* called as "nobody". This script was a morass of confusion
      cause of having to call it as nobody before the user actually
      exists. In fact, another of my ongoing projects is to reduce the
      number of scripts called as a particular user, but thats a story for
      another day. Anyway, the script is always called as nobody, but we
      pass along the implied user in the environment so that it can do
      permission checks.
      16aaa101
    • Leigh Stoller's avatar
      35193718
  9. 12 Jan, 2007 2 commits
  10. 11 Jan, 2007 1 commit
  11. 10 Jan, 2007 2 commits
  12. 09 Jan, 2007 2 commits
  13. 05 Jan, 2007 2 commits
    • Leigh Stoller's avatar
      63b87a12
    • Leigh Stoller's avatar
      Several fixes/changes: · 54705b2b
      Leigh Stoller authored
      * The unix group and gid are actuallt part of the group structure, not
        the project. So, when we load a project, load its default group as
        well, and have the routines for the name/gid hand off to the group.
      
      * Change Lookup() to allow either a new idx or an old pid by looking
        at the format of the token. This will make it easier to transition
        to the new order of things.
      
      * Part of the uncommitted uid changes is the addition of head_idx to
        replace head_uid. This code change is okay to commit now, since for
        the time being idx will shadow uid in all tables.
      54705b2b
  14. 03 Jan, 2007 1 commit
    • Leigh Stoller's avatar
      Move most of the password changing code to the backend, as I just did · 32983db4
      Leigh Stoller authored
      for email changes. Currently, the hash is passed in on the command
      line from the web interface, and there is no method for invoking it on
      the command line and providing a text password, but that is an easy
      change now that the bulk of the code is in the backend instead of the
      web interface.
      
      Note that this change took longer cause we allow inactive,frozen, and
      wikionly users to change their password, but since they do not have
      accounts (yet) the operation is invoked as user "nobody" and tbacct
      about to me made aware of that possibility.
      
      Also add equivalent auditing email message that goes to the user when
      password is changed.
      
      Also more cleanup and conversion to objects.
      32983db4
  15. 13 Dec, 2006 1 commit
  16. 07 Dec, 2006 1 commit
    • Russ Fish's avatar
      Update setup{,-ops}.txt for FreeBSD-6.1 . · 5ffb5664
      Russ Fish authored
      The packagedir is now passed to {ops,boss}-install with a -p argument instead of
      as a PKG_PATH envar.  If the old way is done, PKG_PATH is ignored and packages are
      all built from sources.  This failed in many ways (due to sync problems between the
      6.1 packages and ports tarballs?)  In any case, to prevent others falling down the
      same rabbit-hole, building from sources is now off by default, requiring a -s
      argument to be given to do it.  Libinstall now shows PhaseSkip reasons, to make
      it more clear what's going on.
      
      Also tweak dhcpd_makeconf to handle a null DHCPD_DYNRANGE in the defs file,
      to prevent a bogus dhcpd response from an inner emulab, half set-up for testing.
      5ffb5664
  17. 04 Dec, 2006 1 commit
  18. 30 Nov, 2006 1 commit
  19. 29 Nov, 2006 1 commit
    • Leigh Stoller's avatar
      Keith Sklower's changes to support a single control network model for · 08737f67
      Leigh Stoller authored
      ElabInElab experiments, so as not to consume an interface.
      
      I actually modified Keith's changes so that we can dynmaically choose
      the single or dual model in the NS file (Keith's changes hardwired the
      system to only single control network) since the single network model
      has the disadvantage of not allowing new nodes to be added to an inner
      elab, which would make it impossible to test some things (like the
      newnode path!).
      
      To choose the single control network model, place this in your NS file:
      
      	tb-elabinelab-singlenet
      
      other it defaults to the older dual network model.
      08737f67
  20. 27 Nov, 2006 3 commits
    • Leigh Stoller's avatar
      Single Control Network ElabInElab change; this is a small part of · c4734ac0
      Leigh Stoller authored
      Keith's diff to support a single control network for ElabInElab
      experiments, which I need installed so I can test the rest of the
      changes. More details later.
      c4734ac0
    • Leigh Stoller's avatar
      81a10c61
    • Leigh Stoller's avatar
      Call this commit "Snow in Corvallis" ... · 4998b2d7
      Leigh Stoller authored
      The major functional change in this revision is converting from user
      selected UIDs to system selected UIDs. This is controlled by the
      variable $USERSELECTUIDS in defs/defs.php3.in which is now set to
      zero, so system selected UIDs is the default.
      
      The algo for creating the uid is to take the email address, strip the
      @whatever from it, squeeze out dots and dashes and underlines, and
      make sure any +foo tokens are removed. Then make sure it is unique by
      taking the first 5 characters and then adding a 3 digit number,
      derived by checking the DB to see what exists.
      
      Since we will want to (more often) change the UID selected, there is a
      new admin only menu option on the Show User page. It calls the backend
      script to do the work (sbin/changeuid).
      
      The login page now defaults to storing and showing the email address
      for login, rather then the UID. It will still accept either one though
      (has for a long time).
      
      Along the way I also reorg'ed a number of pages to use the new user,
      group, and project classes and moved some common functionality into
      the class defs.
      
      Also changed the way addpubkey is called, to avoid some confusion.
      4998b2d7
  21. 21 Nov, 2006 1 commit
    • Kevin Atkinson's avatar
      · 569070cb
      Kevin Atkinson authored
      Add fix for:
        *** WARNING: batch_daemon:
        ***   dblog failed: Can't bless non-reference value at
        ***   /usr/testbed/lib/libdb.pm line 299.
      which was caused by trying the blass an undefined value which is
      happens when Mysql->connect failed.
      569070cb
  22. 15 Nov, 2006 1 commit
  23. 09 Nov, 2006 1 commit
  24. 03 Nov, 2006 3 commits
    • Kevin Atkinson's avatar
      · d6dfc642
      Kevin Atkinson authored
      Add better explanation for the hack to get around "(in cleanup) Can't
      call method "FETCH" on an undefined value..." in libdb.pm
      d6dfc642
    • Kevin Atkinson's avatar
      · 1d194be8
      Kevin Atkinson authored
      Fix warning in spewconlog:
              (in cleanup) Can't call method "FETCH" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.8/mach/Mysql.pm line 91 during global destruction.
      and probably other places.
      1d194be8
    • Leigh Stoller's avatar
      Big set of changes intended to solve a couple of problems with long · ff9061d4
      Leigh Stoller authored
      term archiving of firstclass objects like users, projects, and of
      course templates.
      
      * Projects, Users, and Groups are now uniquely identified inside the
        DB by a index value that will not be reused. If necessary, this
        could easily be a globally unique identifier, but without federation
        there is no reason to do that yet.
      
      * Currently, pid, gid, and uid still need to be locally unique until
        all of the changes are in place (which is going to take a fairly
        long time since the entire system operates in terms of those, except
        for the few places that I had to change to get the ball rolling).
      
      * We currently archive deleted users to the deleted_users table (their
        user_stats are kept forever since they are indexed by the new index
        column). Eventually do the same with projects (not sure about
        groups) but since we rarely if ever delete a project, there is no
        rush on this one.
      
      * At the same time, I have started a large reorg of the code, to move
        all of the user, group, project code into modules, both in php and
        perl, turning them into first class "objects" (as far as that goes
        in php and perl). Eventually, the number of query statements
        scattered around the code will be manageable, or so I hope.
      
      * Another related part of this reorg is to make it easier to move the
        new user/project/group code in the perl backend so that it can be
        made available via the xmlrpc interface (without duplication of the
        code).
      ff9061d4
  25. 26 Oct, 2006 1 commit
  26. 25 Oct, 2006 1 commit
    • Leigh Stoller's avatar
      Makefile Whacking! Try to deal with the problem caused by the delay · 7590f9c5
      Leigh Stoller authored
      between when something is installed and when post-install runs. Short
      of a global lock (which we probably need anyway someday), my solution
      is this. In your makefiles, add these variables before the line that
      has the include of $(TESTBED_SRCDIR)/GNUmakerules:
      
      	SETUID_BIN_SCRIPTS   =
      	SETUID_SBIN_SCRIPTS  =
      
      I have added three new rules to GNUmakerules that look like this:
      
      	$(addprefix $(SBINDIR)/, $(SETUID_SBIN_SCRIPTS)): $(SBINDIR)/%: %
      		echo "Installing (setuid) $<"
      		-mkdir -p $(INSTALL_SBINDIR)
      		$(SUDO) $(INSTALL) -o root -m 4755 $< $@
      
      Yep, your eyes ain't lying to you; use sudo to run the target so that
      install does the right thing (which is that the old file is not
      replaced until the new one has the proper attributes on it).
      
      Note that post-install is still needed for the initial install, but
      should no longer be needed for day to day installs since all that other
      stuff post-install does is mkdir/chmod on directories.
      7590f9c5