The addresses from mac_pool generator were not sanitized so any address
containing some letter would fail comparison check because of case
sensitivity. I used normalize_hwaddr() function that we used globally
in the code for hardware address manipulation.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/Machine.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 78ba622..193f611 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -558,8 +558,9 @@ class VirtualInterface(Interface):
msg = "Device with hwaddr %s already exists" % self._hwaddr
raise MachineError(msg)
else:
+ mac_pool = self._machine.get_mac_pool()
while True:
- self._hwaddr = self._machine.get_mac_pool().get_addr()
+ self._hwaddr = normalize_hwaddr(mac_pool.get_addr())
query = self._machine._rpc_call('get_devices_by_hwaddr',
self._hwaddr)
if not len(query):
--
1.8.1.4
Show replies by date