1. 29 Jul, 2011 6 commits
  2. 28 Jul, 2011 9 commits
  3. 27 Jul, 2011 4 commits
  4. 26 Jul, 2011 12 commits
  5. 25 Jul, 2011 5 commits
  6. 22 Jul, 2011 4 commits
    • Iustin Pop's avatar
      htools: rework the algorithm for ChangeAll mode · 97da6b71
      Iustin Pop authored
      
      
      I think I've identified the problem with the current ChangeAll
      mode. The current algorithm works as follows:
      
      - identify a new primary by choosing the node which gives best score
        as new secondary
      - failover to it
      - identify a new secondary by choosing the node which gives best score
        as new secondary
      
      This means that the future primary is 'fixed' after the first
      iteration, leaving to possibly suboptimal results. This patch changes
      the algorithm to do what, in hindsight, seems the obvious thing to do:
      - generate all pairs (primary, secondary)
      - identify the pair that after the above sequence (r:np, f, r:ns)
        gives the best group score
      
      This fixes some of the corner cases I've seen in relocation, but not
      all; the remaining cases are related to multi-instance relocation and
      while they can't be fixed in the current framework, the needed
      rebalancing is much smaller than with the current algorithm.
      
      The patch also fixes an issue with the docstring of another function.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      97da6b71
    • Michael Hanselmann's avatar
      gnt-instance info: Return static info if node offline · f965260c
      Michael Hanselmann authored
      
      
      Before this patch “gnt-instance info” would fail with the error message
      “Error checking node $node: Node is marked offline” if the instance's
      primary node is marked offline and the user didn't explicitely request
      static information only. With this patch the LU will automatically
      return static information if the instance's primary node is marked
      offline.
      
      Some explicit loops are changed to map().
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      f965260c
    • Michael Hanselmann's avatar
      Ignore offline primary when failing over · 3b61ee44
      Michael Hanselmann authored
      
      
      When the source node for a failover is marked offline, there's no need
      to require the user to specify “--ignore-consistency”.
      
      To make it work at all, a number of bugs introduced by the merge of
      migration and failover are also fixed by this patch.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      3b61ee44
    • Iustin Pop's avatar
      htools: replace two hardcoded uses of pri+sec nodes · 77ecfa82
      Iustin Pop authored
      
      
      These two cases use explicit uses of primary and secondary nodes with
      Instance.allNodes, which means the code is more flexible if the
      internal layout of the instance changes.
      
      I've verified that the output of involvedNodes  is not required to be
      4-element long, and as such the function docstring has been updated.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      77ecfa82