FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
0c7be7f4
Commit
0c7be7f4
authored
2 years ago
by
J.W. Smith
Browse files
Options
Downloads
Patches
Plain Diff
fix: More specific check of ssh exit status codes
parent
9f19cef1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
coordinator/ProcessorServer.py
+11
-2
11 additions, 2 deletions
coordinator/ProcessorServer.py
with
11 additions
and
2 deletions
coordinator/ProcessorServer.py
+
11
−
2
View file @
0c7be7f4
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment