scm: Add retries to container-image download
If all retries fail, let's also log the error output. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
e33ac15d99
commit
b99bcfb5ee
1 changed files with 10 additions and 2 deletions
|
|
@ -373,8 +373,16 @@ class ContainerImageScmWrapper(ScmBase):
|
|||
"oci:" + target_dir,
|
||||
"--remove-signatures",
|
||||
]
|
||||
self.log_debug("Exporting container %s to %s: %s", scm_root, target_dir, cmd)
|
||||
run(cmd, can_fail=False)
|
||||
try:
|
||||
self.log_debug(
|
||||
"Exporting container %s to %s: %s", scm_root, target_dir, cmd
|
||||
)
|
||||
self.retry_run(cmd, can_fail=False)
|
||||
except RuntimeError as e:
|
||||
self.log_error(
|
||||
"Failed to copy container image: %s %s", e, getattr(e, "output", "")
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def _get_wrapper(scm_type, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue