1. 25 Mar, 2008 4 commits
  2. 20 Mar, 2008 2 commits
    • Manuel Franceschini's avatar
      Modify cluster-init to create file-storage-dir · 2872a949
      Manuel Franceschini authored
      This patch adds three things:
      - it normalizes the file storage directory path passed to gnt-cluster init
      - if the file-storage-path doesn't exist on the master node, ganeti
        tries to create it
      - adds additional check if the passed file-storage-dir is not a directory
      Reviewed-by: iustinp
    • Iustin Pop's avatar
      Remove some deprecated code in bdev.py · 39e9e213
      Iustin Pop authored
      The BlockDev.GetStatus() method and some associated constants were never
      used in the rest of the code. This patch removes them.
      Reviewed-by: imsnah
  3. 19 Mar, 2008 9 commits
  4. 18 Mar, 2008 10 commits
  5. 11 Mar, 2008 3 commits
    • Guido Trotter's avatar
      Specify better gnt-instance(8) replace-disks · 6536dfa1
      Guido Trotter authored
      The -s option when changing secondary node on a drbd template is implied, and
      thus optional. Specify this in the manpage.
      Reviewed-by: iustinp
    • Iustin Pop's avatar
      Disable cluster init with a reachable IP · 411f8ad0
      Iustin Pop authored
      Make the cluster init fail if the IP to which the cluster name resolved
      is already reachable by the master node. This is not a foolproof
      solution, but it allows a cheap method of detecting simple mistakes.
      It will also disallow using the master node name as cluster name (which
      is something good).
      The only drawbacks that I see are:
        - you are not allowed to do this, which might come in handy in cluster
          upgrades; but since we support rename, this is mitigated
        - cluster init takes longer now (+the timeout value, set to 5
          seconds), but since this is a one-off operation, it should be ok
      Reviewed-by: ultrotter
    • Iustin Pop's avatar
      Modify utils.TcpPing to make source address optional · b15d625f
      Iustin Pop authored
      This patch modifies TcpPing and its callers to make the source address
      selection optional. Usually, the kernel will know better what
      source address to use, just in some cases we want to enforce a given
      source address so it makes sense to make this optional.
      Reviewed-by: ultrotter
  6. 06 Mar, 2008 1 commit
    • Guido Trotter's avatar
      Fix gnt-instance replace-disks online help · 457697bc
      Guido Trotter authored
      The "quick" online help just reported the option to change secondary node. Add
      the ones to just replace the disk locally on-primary or on-secondary. It is of
      course impossible to espress in one line everything needed to use this command,
      but at least now the most common options are spelled out immediately.
      Reviewed-by: iustinp, imsnah
  7. 05 Mar, 2008 2 commits
  8. 04 Mar, 2008 9 commits
    • Guido Trotter's avatar
      LockSet: handle empty case · b2dabfd6
      Guido Trotter authored
      A LockSet is mostly useful when it has some locks in it. On the other hand
      there are cases in which it must function even when empty. For example if a
      cluster has no instances in it there's no reason why locking all of them
      shouldn't work anyway. This patch adds test code for that situation and
      implements the necessary fixes to make it work.
      Reviewed-by: imsnah
    • Guido Trotter's avatar
      LockSet: add missing check code · b5c0e9d9
      Guido Trotter authored
      This check that no operation had been performed before release() was missing in
      the test code. Adding it.
      Reviewed-by: imsnah
    • Guido Trotter's avatar
      LockSet: collapse two try/except into one · ea3f80bf
      Guido Trotter authored
      Reviewed-by: imsnah
    • Guido Trotter's avatar
      SharedLock: remove wrong assertion in code · 9a39f854
      Guido Trotter authored
      r644 contained some cleanup code for LockSet. Among other things it removed a
      syntax error that allowed an assertion that previously wan't really checked to
      trigger. It turns out that even though the spirit of that assertion was correct
      its actual implementation was wrong.
      While it's true that no sharers must be waiting if an exclusive holder is not
      present it might happen that when all the sharers wake up one of them releases
      the lock before some other even has had a chance to run. In this case
      __shr_wait would still be greater than 0, even if the sharer is not actually
      waiting, just pending a wakeup to proceed.
      Thus, removing the assertion in question.
      Reviewed-by: imsnah
    • Michael Hanselmann's avatar
      Codestyle updates for locking code · cdb08f44
      Michael Hanselmann authored
      Reviewed-by: ultrotter
    • Guido Trotter's avatar
      LockSet: make acquire() able to get the whole set · 3b7ed473
      Guido Trotter authored
      This new functionality makes it possible to acquire a whole set, by passing
      "None" to the acquire() function as the list of elements. This will avoid new
      additions to the set, and then acquire all the current elements. The list of
      all elements acquired will be returned at the end.
      Deletions can still happen during the acquire process and we'll deal with it by
      just skipping the deleted elements: it's effectively as if they were deleted
      before we called the function. After we've finished though we hold all the
      elements, so no more deletes can be performed before we release them.
      Any call to release() will then first of all release the "set-level" lock if
      we're holding it, and then all or some of the locks we have.
      Some new tests checks that this feature works as intended.
      Reviewed-by: imsnah
    • Guido Trotter's avatar
      LockSet: encapsulate acquire() in try-except · 806e20fd
      Guido Trotter authored
      This patch adds a try/except area around most of the acquire() code (everything
      after the intial condition checks). Since the except: clause contains just a
      'raise' nothing really changes except the indentation of the code.
      This is done in a separate commit to insulate and make clearer what the real
      code changes done in the upcoming patch are.
      Reviewed-by: imsnah
    • Guido Trotter's avatar
      Make LockSet.__names() return a list, not a set · 0cf257c5
      Guido Trotter authored
      Previously the private version of the __names function returned directly a set.
      We'll keep this in the public interface but change the private version to a
      list in order to be able to sort() its result and then loop on it, even though
      we'll need to do this with the usual care that some keys may disappear in
      Reviewed-by: imsnah
    • Guido Trotter's avatar
      LockSet: improve remove() api · 3f404fc5
      Guido Trotter authored
      Lockset's remove() function used to return a list of locks we failed to remove.
      Rather than doing this we'll return a list of removed locks, so it's more
      similar to how acquire() behaves. This patch also fixes the relevant unit tests.
      Reviewed-by: imsnah