You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2026/04/07 07:15:39 UTC
(ozone) branch master updated: HDDS-14963. Retry attempt to pull docker images (#10047)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 0c3751acfa4 HDDS-14963. Retry attempt to pull docker images (#10047)
0c3751acfa4 is described below
commit 0c3751acfa472309aaa9a0a689307dabcf98db0c
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Tue Apr 7 09:15:33 2026 +0200
HDDS-14963. Retry attempt to pull docker images (#10047)
---
.../dist/src/main/compose/common/hadoop-test.sh | 1 +
hadoop-ozone/dist/src/main/compose/testlib.sh | 26 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/hadoop-ozone/dist/src/main/compose/common/hadoop-test.sh b/hadoop-ozone/dist/src/main/compose/common/hadoop-test.sh
index 29b4937a4aa..ae1b8545820 100755
--- a/hadoop-ozone/dist/src/main/compose/common/hadoop-test.sh
+++ b/hadoop-ozone/dist/src/main/compose/common/hadoop-test.sh
@@ -59,6 +59,7 @@ for HADOOP_TEST_IMAGE in $HADOOP_TEST_IMAGES; do
hadoop_version=$(docker run --rm "${HADOOP_TEST_IMAGE}" bash -c "hadoop version | grep -m1 '^Hadoop' | cut -f2 -d' '")
export HADOOP_MAJOR_VERSION=${hadoop_version%%.*}
+ retry docker-compose --ansi never --profile hadoop pull nm rm
docker-compose --ansi never --profile hadoop up -d nm rm
execute_command_in_container rm hadoop version
diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh b/hadoop-ozone/dist/src/main/compose/testlib.sh
index 0dc67bff490..eb3ede6f47a 100755
--- a/hadoop-ozone/dist/src/main/compose/testlib.sh
+++ b/hadoop-ozone/dist/src/main/compose/testlib.sh
@@ -179,6 +179,8 @@ start_docker_env(){
docker-compose --ansi never down --remove-orphans
+ retry docker-compose --ansi never pull
+
opts=""
if has_scalable_datanode; then
opts="--scale datanode=${datanode_count}"
@@ -357,6 +359,30 @@ save_container_logs() {
done
}
+retry() {
+ local -i n=0
+ local -i attempts=${RETRY_ATTEMPTS:-3}
+ local -i rc=0
+
+ set +e
+ while [[ $n -lt $attempts ]]; do
+ if "$@"; then
+ rc=0
+ break
+ fi
+ let n++
+
+ if [[ $n -eq $attempts ]]; then
+ echo "ERROR: $n attempts failed to: $@"
+ rc=1
+ else
+ sleep ${RETRY_SLEEP:-3}
+ fi
+ done
+ set -e
+
+ return ${rc}
+}
## @description wait until the port is available on the given host
## @param The host to check for the port
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org