Iallocator mode reloc, parameter reloc_from takes a list; half of the
code already forced this parameter to list, we add the other two cases
where it is needed.
---
lib/cmdlib.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 9955e4c..703992d 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -9196,7 +9196,7 @@ class TLReplaceDisks(Tasklet):
ial = IAllocator(lu.cfg, lu.rpc,
mode=constants.IALLOCATOR_MODE_RELOC,
name=instance_name,
- relocate_from=relocate_from)
+ relocate_from=list(relocate_from))
ial.Run(iallocator_name)
@@ -13133,7 +13133,8 @@ class LUTestAllocator(NoHooksLU):
elif self.op.mode == constants.IALLOCATOR_MODE_RELOC:
fname = _ExpandInstanceName(self.cfg, self.op.name)
self.op.name = fname
- self.relocate_from = self.cfg.GetInstanceInfo(fname).secondary_nodes
+ self.relocate_from = \
+ list(self.cfg.GetInstanceInfo(fname).secondary_nodes)
elif self.op.mode == constants.IALLOCATOR_MODE_MEVAC:
if not hasattr(self.op, "evac_nodes"):
raise errors.OpPrereqError("Missing attribute 'evac_nodes' on"
--
1.7.3.1