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> (cherry picked from commit b99bcfb5eebf0d14d284fa0ab1bc2631d9e14ae3)
This commit is contained in:
parent
4f53c5257d
commit
64e1c30100
@ -373,8 +373,16 @@ class ContainerImageScmWrapper(ScmBase):
|
|||||||
"oci:" + target_dir,
|
"oci:" + target_dir,
|
||||||
"--remove-signatures",
|
"--remove-signatures",
|
||||||
]
|
]
|
||||||
self.log_debug("Exporting container %s to %s: %s", scm_root, target_dir, cmd)
|
try:
|
||||||
run(cmd, can_fail=False)
|
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):
|
def _get_wrapper(scm_type, *args, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user