Fix instance failover in case of DTS_EXT_MIRROR
authorDimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
Thu, 30 Jul 2015 19:56:47 +0000 (22:56 +0300)
committerHrvoje Ribicic <riba@google.com>
Mon, 17 Aug 2015 15:11:41 +0000 (15:11 +0000)
commit413a443de9a01e24ed5d95703c59f4fc204e823b
tree5228a6529052c720d12291044486686986f0e285
parent9c335ceebcfed327689a1d1f3189e683b8784418
Fix instance failover in case of DTS_EXT_MIRROR

Since 2.14 L{objects.Instance} no longer has a disk_template
slot, thus we must obtain it indirectly via cfg.GetInstanceDiskTemplate().

Commit ff74b60 uses the _CloseInstanceDisks() helper during instance
failover in case the instance's disk template is DTS_EXT_MIRROR,
but uses the instance.disk_template value directly, which is a bug.
Fix this.

Signed-off-by: Dimitris Aragiorgis <dimitris.aragiorgis@gmail.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
lib/cmdlib/instance_migration.py