Retry nerdctl tag command
Related-Prod: PRODX-51961
Change-Id: Iaf4f4dc997a700aef4cfe25bf120aecde3ceb6f0
diff --git a/de/heat-templates/scripts/functions.sh b/de/heat-templates/scripts/functions.sh
index b106bd9..7c44921 100644
--- a/de/heat-templates/scripts/functions.sh
+++ b/de/heat-templates/scripts/functions.sh
@@ -340,7 +340,10 @@
for image in $(docker container run --rm --name ucp -v /var/run/docker.sock:/var/run/docker.sock ${DOCKER_UCP_IMAGE} images --list); do
pull_image "${image_prefix}/${image##*/}"
if [[ $KUBERNETES_CONTAINER_RUNTIME == "crio" ]]; then
- nerdctl --address unix:///run/containerd/containerd.sock -n k8s.io tag ${image_prefix}/${image##*/} mirantis/${image##*/}
+ function retry_nerdctl_tag {
+ nerdctl --address unix:///run/containerd/containerd.sock -n k8s.io tag ${image_prefix}/${image##*/} mirantis/${image##*/}
+ }
+ retry 10 "Failed to tag image" retry_nerdctl_tag
fi
docker tag ${image_prefix}/${image##*/} mirantis/${image##*/}
done