Skip to content
Snippets Groups Projects
Commit 9a3d3206 authored by Florent Thiery's avatar Florent Thiery
Browse files

test for celerity connectivity, refs #20596

parent 34dbcae5
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,17 @@ def run_tests(ip): ...@@ -47,6 +47,17 @@ def run_tests(ip):
print('%apt-get update failed on MediaWorker%s' % (RED, DEF)) print('%apt-get update failed on MediaWorker%s' % (RED, DEF))
return False return False
def check_celerity_connectivity(ip):
h = conf.get('MS_SERVER_NAME')
cmd = "ssh %i curl -k https://%s:6200" % (ip, h)
print('Checking celerity connectivity: %s' % cmd)
d = subprocess.check_output(cmd, shell=True, timeout=5)
if "Celerity tasks server" in d:
print('%sSuccessfully reached tasks server%s' % (GREEN, DEF))
return True
print('%sFailed to reach tasks server%s' % (RED, DEF))
return False
all_ok = True all_ok = True
worker_ip = conf.get('CELERITY_WORKER_IP') worker_ip = conf.get('CELERITY_WORKER_IP')
...@@ -56,4 +67,7 @@ if worker_ip != '127.0.1.1': ...@@ -56,4 +67,7 @@ if worker_ip != '127.0.1.1':
else: else:
if not run_tests(worker_ip): if not run_tests(worker_ip):
all_ok = False all_ok = False
if not check_celerity_connectivity(ip):
all_ok = False
sys.exit(int(not all_ok)) sys.exit(int(not all_ok))
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