FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 0c7be7f4 authored by J.W. Smith's avatar J.W. Smith
Browse files

fix: More specific check of ssh exit status codes

parent 9f19cef1
No related branches found
No related tags found
No related merge requests found
......@@ -52,13 +52,13 @@ def process_pre_job_server_download(input_args: dict):
"StrictHostKeyChecking=no",
config['ServerName'],
f"test -f {file_path_full} && tar -tzf {file_path_full} >/dev/null"]
description_short = 'subprocess_ssh'
description_long = f"Checking for existence of {file_path_full}"
status = subprocess_and_log(cmd_ssh,description_short,description_long,check=False)
if status.returncode > 0:
if status.returncode in [1,2]:
# a time check in UTC. If it's late, raise warning, if very late, raise error
......@@ -95,6 +95,15 @@ def process_pre_job_server_download(input_args: dict):
elif status.returncode == 0:
logger.info(f"Data is available for config {i+1} of {len(config_paths)}, calculation shall proceed")
# silence other return codes
# there is a known issue from tests that ssh to a blank server will
# raise error code 255. This is kept silent while we come up with a tidy
# solution. This doesn't affect production runs as the error would be
# picked up by the later scp commands.
#else:
# logger.error(f"Unexpected return code from ssh command: {status.returncode}")
# endScript(premature=False)
return True
def upload(config,FilesToSend,component):
......
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