1. 20 Apr, 2011 1 commit
    • Leigh B Stoller's avatar
      Changes our ssh key/account handling in RedeemTicket() and · 03c2107c
      Leigh B Stoller authored
      CreateSliver(), to handle multiple accounts.  This somewhat reflects
      the Geni AM API for keys, which allows the client to specify multiple
      users, each with a set of ssh keys.
      
      The keys argument to the CM now looks like the following (note that
      the old format is still accepted and will be for a while).
      
      [{'urn'   => 'urn:blabla'
        'login' => 'dopey',
        'keys'  => [ list of keys like before ]},
       {'login' => "leebee",
        'keys'  => [ list of keys ... ]}];
      
      Key Points:
      
      1. You can supply a urn or a login or both. Typically, it is going to
         be the result of getkeys() at the PG SA, and so it will include
         both.
      
      2. If a login is provided, use that. Otherwise use the id from the urn.
      
      3. No matter what, verify that the token is valid for Emulab an uid
         (standard 8 char unix login that is good on just about any unix
         variant), and transform it if not.
      
      4. For now, getkeys() at the SA will continue to return the old format
         (unless you supply version=2 argument) since we do not want to
         default to a keylist that most CMs will barf on.
      
      5. I have modified the AM code to transform the Geni AM version of the
         "users" argument into the above structure. Bottom line here, is
         that users of the AM interface will not actually need to do
         anything, although now multiple users are actually supported
         instead of ignored.
      
      Still to be done are the changes to the login services structure in
      the manifest. We have yet to settle on what these changes will look
      like, but since people generally supply valid login ids, you probably
      will not need this, since no transformation will take place.
      03c2107c
  2. 11 Apr, 2011 2 commits
  3. 04 Apr, 2011 2 commits
  4. 01 Apr, 2011 2 commits
  5. 02 Feb, 2011 1 commit
  6. 21 Dec, 2010 1 commit
  7. 07 Dec, 2010 1 commit
  8. 09 Nov, 2010 1 commit
  9. 27 Oct, 2010 1 commit
  10. 18 Oct, 2010 1 commit
  11. 15 Oct, 2010 1 commit
    • Mike Hibler's avatar
      Add autoconf variable to control use of SelfLoader. · da55641a
      Mike Hibler authored
      This is a fer-now hack.  Perl 5.10 has issues with bogus taint check
      triggers that appear quite often when using the SelfLoader.  Now if you put:
          SELFLOADER_DATA=""
      In your defs-* file, it will disable the uses that cause problems.  Yes,
      the configure script should figure out if this is needed for you, but...
      another time.
      da55641a
  12. 13 Oct, 2010 1 commit
    • Mike Hibler's avatar
      Remove taint mode from some daemons. · 605a4bd1
      Mike Hibler authored
      That change I made to EmulabConstants.pm.in only worked around one instance
      of the problem.  Apparently in perl 5.10 there is a known bug related to
      taint mode and self loading?  Anyway, the short-term fix is either to move
      to perl 5.12 (no thanks) or disable taint checking failures when we hit the
      problem.
      605a4bd1
  13. 11 Oct, 2010 1 commit
    • Leigh B Stoller's avatar
      Work on an optimization to the perl code. Maybe you have noticed, but · 92f83e48
      Leigh B Stoller authored
      starting any one of our scripts can take a second or two. That time is
      spent including and compiling 10000s of thousands of lines of perl
      code, both from our libraries and from the perl libraries.
      
      Mostly this is just a maintenance thing; we just never thought about
      it much and we have a lot more code these days.
      
      So I have done two things.
      
      1) I have used SelfLoader() on some of our biggest perl modules.
         SelfLoader delays compilation until code is used. This is not as
         good as AutoLoader() though, and so I did it with just a few 
         modules (the biggest ones).
      
      2) Mostly I reorganized things:
      
        a) Split libdb into an EmulabConstants module and all the rest of
           the code, which is slowly getting phased out.
      
        b) Move little things around to avoid including libdb or Experiment
           (the biggest files).
      
        c) Change "use foo" in many places to a "require foo" in the
           function that actually uses that module. This was really a big
           win cause we have dozens of cases where we would include a
           module, but use it in only one place and typically not all.
      
      Most things are now starting up in 1/3 the time. I am hoping this will
      help to reduce the load spiking we see on boss, and also help with the
      upcoming Geni tutorial (which kill boss last time).
      92f83e48
  14. 29 Sep, 2010 1 commit
  15. 21 Sep, 2010 1 commit
  16. 04 Aug, 2010 1 commit
  17. 22 Jul, 2010 1 commit
  18. 03 Jun, 2010 1 commit
    • Leigh B Stoller's avatar
      Add more MLE support. Here is a sample NS file that demonstrates the · 958fc09d
      Leigh B Stoller authored
      new code. Note that this commit implements only the frontend part.
      
      set n1 [$ns node]
      set n2 [$ns node]
      set n3 [$ns node]
      
      set seg1 [$ns duplex-link $n1 $n2 * 0ms DropTail]
      set seg2 [$ns duplex-link $n2 $n3 * 0ms DropTail]
      tb-set-link-layer $seg1 1
      tb-set-link-layer $seg2 1
      
      set mypath [$ns make-path "seg1 seg2"]
      
      set link0 [$ns duplex-link $n1 $n3 * 0ms DropTail]
      $link0 implemented_by $mypath
      958fc09d
  19. 16 Apr, 2010 3 commits
  20. 15 Apr, 2010 1 commit
  21. 08 Apr, 2010 1 commit
  22. 29 Mar, 2010 1 commit
  23. 22 Mar, 2010 2 commits
  24. 23 Feb, 2010 1 commit
  25. 07 Nov, 2009 1 commit
  26. 29 Oct, 2009 1 commit
  27. 07 Oct, 2009 1 commit
  28. 24 Sep, 2009 1 commit
  29. 24 Aug, 2009 2 commits
  30. 07 Aug, 2009 1 commit
  31. 23 Jul, 2009 1 commit
    • Leigh B. Stoller's avatar
      Add ReserveSharedBandwidth() method to handle reserving the bandwidth · 8a5eeb82
      Leigh B. Stoller authored
      desired in the vinterfaces table, in the interface_state table.
      Desired bandwidth that has not been reserved is indicated as a
      negative value in vinterfaces; when we update interface_state we also
      update the negative value in vinterfaces (atomically in the same
      query, I am getting good at that multi table stuff).
      
      You would think this would be simple eh? Well, just you think again.
      
      Swap modify (update) has to be considered. When doing a swapmod, the
      old version of vinterfaces is in the backup file, and the new version
      is in the vinterfaces table. But we have to know the old reserved
      bandwidth so we know the proper amount to reserve (in other words,
      release the old reserved bandwidth from the previous table). We waited
      till now to do it, since we do not want to get into a situation where
      we release the BW, assign fails, and then someone else got that BW,
      cause then we are screwed and have to swap out the experiment.
      Unfriendly. So, the update changes happen all at once (tables locked).
      
      So that's it, right? Only for a babe in the woods that you are.
      
      We also have to consider rollback when swapmod fails and we want to
      restore the old experiment state. This can happen either before we
      have reserved the new bandwidth, or afterwards. Each is a different
      situation, and the only way to know what has happened is to update the
      backup table file in the first part of update so that later rollback
      knows. Yep, I change the backed up vinterfaces table. Twice in fact,
      the second time after the rollback finishes. Gack.
      
      Note that rollback can suffer from the problem I was trying to avoid
      in update; losing the reserved bandwidth to someone else and having to
      swap out. Nothing to do about that.
      8a5eeb82
  32. 15 Jul, 2009 1 commit
  33. 11 Jun, 2009 1 commit