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

Changed celerity version check (refs #23674).

parent 327a290a
No related branches found
No related tags found
No related merge requests found
......@@ -92,13 +92,13 @@ def check_celerity_connectivity(ip):
def check_celerity_versions(ip):
print('Checking tha celerity server and worker uses the same version.')
try:
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)
ms_out = subprocess.check_output('dpkg -s celerity-utils | grep "^Version:"', shell=True, timeout=10, universal_newlines=True)
mw_out = subprocess.check_output('ssh -t root@%s dpkg -s celerity-utils | grep "^Version:"' % 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
if ms_out.strip() != mw_out.strip():
print('%sThe celerity version in MediaWorker "%s" is not the same as in MediaServer.%s\nMediaServer version:\n%s\nMediaWorker version:\n%s' % (RED, ip, DEF, ms_out.strip(), mw_out.strip()))
print('%sThe celerity version in MediaWorker "%s" is not the same as in MediaServer.%s\nMediaServer version: \tn%s\nMediaWorker version: \t%s' % (RED, ip, DEF, ms_out.strip(), mw_out.strip()))
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