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

improve logging, refs #20596

parent 4f4f515d
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ conf = es_utils.load_conf() ...@@ -23,7 +23,7 @@ conf = es_utils.load_conf()
def check_ssh(ip): def check_ssh(ip):
cmd = 'ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no %s ls /tmp' % ip cmd = 'ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no %s ls /tmp' % ip
print('Connecting: %s' % cmd) print('Connecting to MediaWorker: %s' % cmd)
try: try:
subprocess.check_output(cmd, shell=True, timeout=2) subprocess.check_output(cmd, shell=True, timeout=2)
print('%sLogged in successfully%s' % (GREEN, DEF)) print('%sLogged in successfully%s' % (GREEN, DEF))
...@@ -33,6 +33,7 @@ def check_ssh(ip): ...@@ -33,6 +33,7 @@ def check_ssh(ip):
return True return True
def check_apt(ip): def check_apt(ip):
print('Checkout apt-get update on MediaWorker')
cmd = 'ssh %s apt-get update' % ip cmd = 'ssh %s apt-get update' % ip
try: try:
subprocess.check_output(cmd, shell=True, timeout=10) subprocess.check_output(cmd, shell=True, timeout=10)
......
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