TLMigrateInstance: Merge failover code, allow fallback
authorRené Nussbaumer <rn@google.com>
Mon, 28 Mar 2011 12:54:33 +0000 (14:54 +0200)
committerRené Nussbaumer <rn@google.com>
Wed, 6 Apr 2011 13:03:21 +0000 (15:03 +0200)
commitd5cafd31456c8b8a56cae0b0e9ab9b7184a2c79a
treebdf9465f72e94068eb52fcd7d872514852f43cf9
parentbbfed756eaf68437a80609b2c4599004582e4232
TLMigrateInstance: Merge failover code, allow fallback

As the code for failover for checking is almost identical it's an easy
task to switch it over to the TLMigrateInstance. This allows us to
fallback to failover if migrate fails prereq check for some reason.

Please note that everything from LUInstanceFailover.Exec is taken over
unchanged to TLMigrateInstance._ExecFailover, only with adaption to
opcode fields and variable referencing, but not in logic. There still
needs to go some effort into merging the logic with the migration (for
example DRBD handling). But this should happen in a separate iteration.

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/cmdlib.py
lib/opcodes.py