This patch adds check between version of Controller and each Slave used for
the actual recipe. If the hashes are different, test ends with an error and
informs user on which machine versions differ
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/Machine.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 14a8061..73f1494 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -21,7 +21,7 @@ from xmlrpclib import Binary
from lnst.Common.Config import lnst_config
from lnst.Common.NetUtils import normalize_hwaddr
from lnst.Common.Utils import wait_for, create_tar_archive
-from lnst.Common.Utils import check_process_running
+from lnst.Common.Utils import check_process_running, get_version_hash
from lnst.Common.NetTestCommand import DEFAULT_TIMEOUT
# conditional support for libvirt
@@ -193,6 +193,10 @@ class Machine(object):
"to machine %s, handshake failed!" % hostname
raise MachineError(msg)
+ if slave_desc["version"] != get_version_hash():
+ raise MachineError("Version hash mismatch between this machine "\
+ "and machine %s (%s)!" % (m_id, hostname))
+
self._slave_desc = slave_desc
for iface in self._interfaces:
--
2.4.3