1. 22 Jul, 2011 3 commits
  2. 21 Jul, 2011 4 commits
  3. 08 Jul, 2011 1 commit
  4. 05 Jul, 2011 2 commits
  5. 01 Jul, 2011 1 commit
  6. 28 Jun, 2011 2 commits
    • Iustin Pop's avatar
      Fix bug in recreate-disks for DRBD instances · b768099e
      Iustin Pop authored
      
      
      The new functionality in 2.4.2 for recreate-disks to change nodes is
      broken for DRBD instances: it simply changes the nodes without caring
      for the DRBD minors mapping, which will lead to conflicts in non-empty
      clusters.
      
      This patch changes Exec() method of this LU significantly, to both fix
      the DRBD minor usage and make sure that we don't have partial
      modification to the instance objects:
      
      - the first half of the method makes all the checks and computes the
        needed configuration changes
      - the second half then performs the configuration changes and
        recreates the disks
      
      This way, instances will either be fully modified or not at all;
      whether the disks are successfully recreate is another point, but at
      least we'll have the configuration sane.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      b768099e
    • Iustin Pop's avatar
      Fix a lint warning · 78ff9e8f
      Iustin Pop authored
      Patch db8e5f1c
      
       removed the use of feedback_fn, hence pylint warn
      now.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      78ff9e8f
  7. 27 Jun, 2011 1 commit
    • Iustin Pop's avatar
      Fix bug in drbd8 replace disks on current nodes · db8e5f1c
      Iustin Pop authored
      
      
      Currently the drbd8 replace-disks on the same node (i.e. -p or -s) has
      a bug in that it does modify the instance disk temporarily before
      changing it back to the same value. However, we don't need to, and
      shouldn't do that: what this operation do is simply change the LVM
      configuration on the node, but otherwise the instance disks keep the
      same configuration as before.
      
      In the current code, this change back-and-forth is fine *unless* we
      fail during attaching the new LVs to DRBD; in which case, we're left
      with a half-modified disk, which is entirely wrong.
      
      So we change the code in two ways:
      
      - use temporary copies of the disk children in the old_lvs var
      - stop updating disk.children
      
      Which means that the instance should not be modified anymore (except
      maybe for SetDiskID, which is a legacy and unfortunate decision that
      will have to cleaned up sometime).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      db8e5f1c
  8. 23 Jun, 2011 1 commit
  9. 17 Jun, 2011 5 commits
  10. 15 Jun, 2011 1 commit
  11. 08 Jun, 2011 2 commits
    • Michael Hanselmann's avatar
      Fix locking issues in LUClusterVerifyGroup · fceb01fe
      Michael Hanselmann authored
      
      
      - Use functions in ConfigWriter instead of custom loops
      - Calculate nodes only once instances locks are acquired, removes one
        potential race condition
      - Don't retrieve lists of all node/instance information without locks
      - Additionally move the end of the node time check window after the
        first RPC call--the second call isn't involved in checking the
        node time at all
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      fceb01fe
    • Michael Hanselmann's avatar
      cmdlib: Acquire BGL for LUClusterVerifyConfig · c5312a10
      Michael Hanselmann authored
      
      
      LUClusterVerifyConfig verifies a number of configuration settings. For
      doing so, it needs a consistent list of nodes, groups and instances. So
      far no locks were acquired at all (except for the BGL in shared mode).
      This is a race condition (e.g. if a node group is added in parallel) and
      can be fixed by acquiring the BGL in exclusive mode. Since this LU
      verifies the cluster-wide configuration, doing so instead of acquiring
      individual locks is just.
      
      Includes one typo fix and one docstring update.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      c5312a10
  12. 07 Jun, 2011 2 commits
  13. 01 Jun, 2011 2 commits
  14. 31 May, 2011 5 commits
  15. 30 May, 2011 1 commit
    • Michael Hanselmann's avatar
      gnt-node migrate: Use LU-generated jobs · b7a1c816
      Michael Hanselmann authored
      
      
      Until now LUNodeMigrate used multiple tasklets to evacuate all primary
      instances on a node. In some cases it would acquire all node locks,
      which isn't good on big clusters. With upcoming improvements to the LUs
      for instance failover and migration, switching to separate jobs looks
      like a better option. This patch changes LUNodeMigrate to use
      LU-generated jobs.
      
      While working on this patch, I identified a race condition in
      LUNodeMigrate.ExpandNames. A node's instances were retrieved without a
      lock and no verification was done.
      
      For RAPI, a new feature string is added and can be used to detect
      clusters which support more parameters for node migration. The client
      is updated.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      b7a1c816
  16. 26 May, 2011 1 commit
    • Michael Hanselmann's avatar
      TLReplaceDisks: Move assertion checking locks · a9b42993
      Michael Hanselmann authored
      Commit 1bee66f3
      
       added assertions for ensuring only the necessary locks
      are kept while replacing disks. One of them makes sure locks have been
      released during the operation. Unfortunately the commit added the check
      as part of a “finally” branch, which is also run when an exception is
      thrown (in which case the locks may not have been released yet). Errors
      could be masked by the assertion error. Moving the check out of the
      “finally” branch fixes the issue.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      a9b42993
  17. 25 May, 2011 1 commit
    • Michael Hanselmann's avatar
      Fix bug in LUNodeMigrate · f8fa4175
      Michael Hanselmann authored
      Commit aac4511a
      
       added CheckArguments to LUNodeMigrate with a call to
      _CheckIAllocatorOrNode. When no default iallocator is defined,
      evacuating a node would always fail:
      
      $ gnt-node migrate node123
      Migrate instance(s) '...'?
      y/[n]/?: y
      Failure: prerequisites not met for this operation:
      No iallocator or node given and no cluster-wide default iallocator
      found; please specify either an iallocator or a node, or set a
      cluster-wide default iallocator
      
      This patch adds a new parameter to specify a target node. This doesn't
      solve all issues, but will make the most important cases work again in
      the meantime. This opcode will receive more work for node group support.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      f8fa4175
  18. 24 May, 2011 1 commit
  19. 20 May, 2011 4 commits