Instance failover: fix bug for INT_MIRROR cases
authorIustin Pop <iustin@google.com>
Wed, 9 Mar 2011 16:23:10 +0000 (17:23 +0100)
committerIustin Pop <iustin@google.com>
Thu, 10 Mar 2011 12:15:52 +0000 (13:15 +0100)
commitfaaabe3c5be86327dc3652c3e50bb8bfec20fbb4
tree2b7e30d075c0698719d68653642074dfccab3692
parentcfed3b9fe20d6ed1b997ef83517cff8ae285b804
Instance failover: fix bug for INT_MIRROR cases

Patches db366d9a and aac4511a added support for EXT_MIRROR instances,
but inadvertently introduced a bug: for INT_MIRROR cases, we don't
need (actually we can't support) neither an iallocator nor a target
node.

To fix this, we move the iallocator/node checks in CheckPrereq (or
respectively in the tasklet CheckPrereq), where we have access to the
instance configuration, and additionally we check for and prevent
passing either of these two for INT_MIRROR instances.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cmdlib.py