Include target node in hooks nodes for migration
authorDimitris Aragiorgis <dimara@grnet.gr>
Fri, 10 Jan 2014 13:00:08 +0000 (15:00 +0200)
committerMichele Tartara <mtartara@google.com>
Fri, 17 Jan 2014 11:45:27 +0000 (12:45 +0100)
commit7b5f0674bbd63e386e180fbf611770587b880469
treeb8ddd1b314f1f421cba20f0947687c0bf963b3c3
parentae6a0a7c5a7cfacff72f307236d236ce965fe4e7
Include target node in hooks nodes for migration

In case of DRBD, hooks run on both primary (source) and secondary
(target) nodes. To get the same behavior for DTS_EXT_MIRROR, where we
do not have secondary node, we should explicitly add target node to
hooks nodes during instance migration/failover.

CheckPrereq() of TLMigrateInstance runs before BuildHooksManager(),
thus target_node calculated by Iallocator is available under
self._migrater.target_node. Use this value instead of
self.op.target_node which can be None.

Update NEWS and related doc entries.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
NEWS
doc/hooks.rst
lib/cmdlib/instance_migration.py