1. 11 Sep, 2008 7 commits
    • Guido Trotter's avatar
      Implement adding/removal of locks by declaration · ca2a79e1
      Guido Trotter authored
      With this patch LUs can declare locks to be added when they start and/or
      removed after they finish. For now locks can only be added in the
      acquired state, and removed if owned, and added locks default to be
      removed again, unless some action is taken.
      
      Reviewed-by: imsnah
      ca2a79e1
    • Guido Trotter's avatar
      LockSet: forbid add() on a partially owned set · d2aff862
      Guido Trotter authored
      This patch bans add() on a half-acquired set. This behavior was
      previously possible, but created a deadlock if someone tried to acquire
      the set-lock in the meantime, and thus is now forbidden. The
      testAddRemove unit test is fixed for this new behavior, and includes a
      few more lines of testing and a new testConcurrentSetLockAdd function
      tests its behavior in the concurrent case.
      
      Reviewed-by: imsnah
      d2aff862
    • Guido Trotter's avatar
      Fix typo in a locking.py comment · ab62526c
      Guido Trotter authored
      Reviewed-by: imsnah
      ab62526c
    • Guido Trotter's avatar
      Use is_owned to determine whether to unlock · 80ee04a4
      Guido Trotter authored
      Now that is_owned is public we don't need to play games at the end of an
      LU. If we're still owning anything we just release it.
      
      Reviewed-by: imsnah
      80ee04a4
    • Guido Trotter's avatar
      Add GanetiLockManager.is_owned function · d4f4b3e7
      Guido Trotter authored
      This is a public version of the private function we already had.
      We don't just change the previous version because it had lots of users
      in the library itself and in the testing code.
      
      Reviewed-by: imsnah
      d4f4b3e7
    • Guido Trotter's avatar
      Fix LockSet._names() to work with the set-lock · d4803c24
      Guido Trotter authored
      If the set-lock is acquired, currently, the _names function will fail on
      a double acquire of a non-recursive lock. This patch fixes the behavior,
      and some lines of code added to the testAcquireSetLock test check that
      this and other functioins behave properly.
      
      Reviewed-by: imsnah
      d4803c24
    • Iustin Pop's avatar
      Add gnt-instance (start|stop) --submit · aefef4f4
      Iustin Pop authored
      Finish the --submit changes with these two, which (because they are
      multi-opcode commands) require special handling.
      
      Reviewed-by: ultrotter
      aefef4f4
  2. 10 Sep, 2008 9 commits
    • Michael Hanselmann's avatar
      jqueue: Add common RPC error handling function · e74798c1
      Michael Hanselmann authored
      We didn't decide yet what exactly it should do with failed nodes.
      
      Reviewed-by: ultrotter
      e74798c1
    • Iustin Pop's avatar
      Remove locking of instances in certain queries · 57a2fb91
      Iustin Pop authored
      This patch is similar to the node patch (rev 1650). We disable locking
      of instance (and nodes) if we only query static information.
      
      Reviewed-by: ultrotter
      57a2fb91
    • Iustin Pop's avatar
      Add an atomic ConfigWrite.GetAllInstanceInfo() · 0b2de758
      Iustin Pop authored
      In order to be able to query instance without locking them, we need the
      same atomic query of multiple instances as for nodes.
      
      Reviewed-by: ultrotter
      0b2de758
    • Iustin Pop's avatar
      Add ConfigWriter._UnlockedGetInstanceList/Info() · 94bbfece
      Iustin Pop authored
      This patch splits the GetInstanceInfo and GetInstanceList methods into
      two parts, one locked one _Unlocked similar to the way nodes are
      queried.
      
      Reviewed-by: ultrotter
      94bbfece
    • Iustin Pop's avatar
      Do not use jobs in gnt-instance _ExpandNames() · b7329c9c
      Iustin Pop authored
      In the gnt-instance script, _ExpandNames() uses jobs to query instance
      names. This is not optimal, so we change it to use queries.
      
      Reviewed-by: ultrotter
      b7329c9c
    • Iustin Pop's avatar
      Implement "--submit" on gnt-instance · 6340bb0a
      Iustin Pop authored
      This patch adds support for the “--submit” parameter in the gnt-instance
      script, for the commands where it makes sense.
      
      Reviewed-by: ultrotter
      6340bb0a
    • Iustin Pop's avatar
      Rewrite the 'only submit job' handling in scripts · e9d741b6
      Iustin Pop authored
      The "sys.exit(0)" was not nice as you couldn't differentiate it from
      other exit codes. We change this to a specially defined exception for
      this, so that multi-opcode commands can handle this nicely.
      
      Reviewed-by: imsnah
      e9d741b6
    • Iustin Pop's avatar
      Optimize the OpQueryNodes for names only · c8d8b4c8
      Iustin Pop authored
      Currently, OpQueryNodes is locking all nodes (in shared mode), which
      will also block the special case of querying only for the node names
      (this is needed for gnt-cluster command, for example). There is no
      logical requirement to not give the administrator enough power if she/he
      knows what to do, so it would be logical that querying the node names
      works without a lock.
      
      The patch changes the LUQuerytNodes.ExpandNodes to only request locking
      when the selected fields contain dynamic attributes, and a small change
      in the Exec() method to use the new, atomic query method from
      ConfigWriter.
      
      Reviewed-by: ultrotter
      c8d8b4c8
    • Iustin Pop's avatar
      Add a way to export all node information at once · d65e5776
      Iustin Pop authored
      The patch adds a new function to export all node information at once
      (i.e. atomically with respect to the configuration lock).
      
      Reviewed-by: ultrotter
      d65e5776
  3. 09 Sep, 2008 17 commits
  4. 08 Sep, 2008 7 commits