If rpcport attribute is set in any machine description file in machine
pool the controller will crash in setAttribute method since it expects
string rather than integer. To avoid this the variable is converted to
string.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/MachinePool.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lnst/Controller/MachinePool.py b/lnst/Controller/MachinePool.py
index 9deb96f..92ddf41 100644
--- a/lnst/Controller/MachinePool.py
+++ b/lnst/Controller/MachinePool.py
@@ -129,7 +129,7 @@ class MachinePool:
supported = ["hostname", "libvirt_domain",
"rpcport"]
for attr_name, attr_val in self._pool[pm_id]["info"].iteritems():
if attr_name in supported:
- info.setAttribute(attr_name, attr_val)
+ info.setAttribute(attr_name, str(attr_val))
mcfg.appendChild(info)
netdevices = dom.createElement("netdevices")
--
1.7.7.6
Show replies by thread