[LTP] [RFC][PATCH 3/4] ci/tumbleweed.sh: Retry on broken repos

Petr Vorel pvorel@suse.cz
Fri Apr 25 17:30:44 CEST 2025


opensuse/leap:latest container repos are sometimes broken:

zypper --non-interactive install --force-resolution --no-recommends autoconf ...
...
(86/88) Installing: kernel-default-devel-6.4.0-150600.23.47.2.x86_64 [..............done]
(87/88) Installing: libopenssl-devel-3.1.4-150600.2.1.noarch [..done]
(88/88) Installing: clang-17-bp156.1.1.x86_64 [..done]
Error: Process completed with exit code 106.

Restarts later help, but let's try to recover with retry 10x with 5 sec
sleep before give up. It slightly prolong the testing, but it might
avoid having to restart the test manually and avoid get permanent
failure in Patchwork, because Patchwork API does not update results, it
just adds a new result.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Not 100% about this (the breakage is usually hour or something).

 ci/tumbleweed.sh | 67 +++++++++++++++++++++++++++++-------------------
 1 file changed, 41 insertions(+), 26 deletions(-)

diff --git a/ci/tumbleweed.sh b/ci/tumbleweed.sh
index d0607eed25..8a30b02c2d 100755
--- a/ci/tumbleweed.sh
+++ b/ci/tumbleweed.sh
@@ -1,31 +1,46 @@
 #!/bin/sh -eux
 # SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) 2018-2021 Petr Vorel <pvorel@suse.cz>
+# Copyright (c) 2018-2025 Petr Vorel <pvorel@suse.cz>
 
 zyp="zypper --non-interactive install --force-resolution --no-recommends"
 
-$zyp \
-	autoconf \
-	automake \
-	clang \
-	curl \
-	jq \
-	findutils \
-	gcc \
-	git \
-	gzip \
-	iproute2 \
-	make \
-	kernel-default-devel \
-	keyutils-devel \
-	libacl-devel \
-	libaio-devel \
-	libcap-devel \
-	libmnl-devel \
-	libnuma-devel \
-	libopenssl-devel \
-	libselinux-devel \
-	libtirpc-devel \
-	linux-glibc-devel \
-	lsb-release \
-	pkg-config
+i=10
+while [ $i != 0 ]; do
+	$zyp \
+		autoconf \
+		automake \
+		clang \
+		curl \
+		jq \
+		findutils \
+		gcc \
+		git \
+		gzip \
+		iproute2 \
+		make \
+		kernel-default-devel \
+		keyutils-devel \
+		libacl-devel \
+		libaio-devel \
+		libcap-devel \
+		libmnl-devel \
+		libnuma-devel \
+		libopenssl-devel \
+		libselinux-devel \
+		libtirpc-devel \
+		linux-glibc-devel \
+		lsb-release \
+		pkg-config
+
+	ret=$?
+
+	if [ $ret -eq 106 ]; then
+		echo "Broken repositories, try $i..."
+		sleep 5
+		i=$((i-1))
+		continue
+	fi
+	break
+done
+
+exit $ret
-- 
2.49.0



More information about the ltp mailing list