From: Ondrej Lichtner <olichtne(a)redhat.com>
When cleaning up a saved configuration the controller will wait for a
result message from the slave when calling the "machine_cleanup" method.
Without this the controller would sometimes remove the virtual devices
before the slave had the time to deconfigure them which will cause an
exception on the slave.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/NetTestController.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 6e0954f..1831a71 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -465,6 +465,10 @@ class NetTestController:
logging.debug("Calling cleanup on slave '%s'" %
hostname)
send_data(rpc_con, rpc_msg)
+ while True:
+ msg = recv_data(rpc_con)
+ if msg['type'] == 'result':
+ break
rpc_con.close()
libvirt_dom = machine["libvirt_dom"]
--
1.8.5.3
Show replies by date