Skip to content
Snippets Groups Projects
Commit d6e30533 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Changed celerity version check (refs #23674).

parent 88cab433
No related branches found
No related tags found
No related merge requests found
......@@ -91,16 +91,14 @@ def check_celerity_connectivity(ip):
def check_celerity_versions(ip):
print('Checking tha celerity server and worker uses the same version.')
cmd = 'diff -Naur <(dpkg -s celerity-utils) <(ssh -t root@%s dpkg -s celerity-utils)' % ip
print(cmd)
try:
out = subprocess.check_output(cmd, shell=True, timeout=5, universal_newlines=True)
ms_out = subprocess.check_output('dpkg -s celerity-utils', shell=True, timeout=10, universal_newlines=True)
mw_out = subprocess.check_output('ssh -t root@%s dpkg -s celerity-utils' % ip, shell=True, timeout=10, universal_newlines=True)
except subprocess.CalledProcessError as e:
print('%sFailed to check celerity version in MediaWorker "%s":\n%s%s' % (RED, ip, e, DEF))
return False
out = out.strip()
if out:
print('%sThe celerity version in MediaWorker "%s" is not the same as in MediaServer:\n%s%s' % (RED, ip, out, DEF))
if ms_out.strip() != mw_out.strip():
print('%sThe celerity version in MediaWorker "%s" is not the same as in MediaServer.%s' % (RED, ip, DEF))
return False
print('%sThe celerity version in MediaWorker "%s" is the same as in MediaServer.%s' % (GREEN, ip, DEF))
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment