Fix issue in LUClusterVerifyGroup with multi-group clusters
authorIustin Pop <iustin@google.com>
Thu, 26 Jul 2012 14:43:18 +0000 (16:43 +0200)
committerIustin Pop <iustin@google.com>
Thu, 26 Jul 2012 15:38:54 +0000 (17:38 +0200)
commit350506c61c61cb73749af61810f9cb1ab2ee201b
tree5e8f1c4c37b06db67c4001595f09242fea7d6e69
parent52bebbdfcf9ba4679e4303f3b912559cf0bc5ec5
Fix issue in LUClusterVerifyGroup with multi-group clusters

In case LUClusterVerifyGroup is run on a group which doesn't contain
the master node, the following could happen:

- master node is selected due to the explicit check
- if the order of nodes in the 'absent_nodes' list is such that the
  master node is the first in it, then we'll select (again) the master
  node
- passing duplicate nodes to RPC calls will break due to RPC
  internals; this should be fixed separately, but in the meantime we
  just refrain from passing such duplicates

This patch should not change the semantics of the code, since it
wasn't guaranteed even before that we find a vm_capable node.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
lib/cmdlib.py