mirror of
https://github.com/coreos/fedora-coreos-config.git
synced 2026-02-05 09:45:30 +01:00
tree: import changes from testing-devel at 16bba09648
This commit is contained in:
@@ -30,7 +30,7 @@ if [[ $(systemctl show -p ActiveState rpm-ostree-countme.timer) != "ActiveState=
|
||||
fi
|
||||
|
||||
# Try five times to avoid Fedora infra flakes
|
||||
for i in $(seq 1 5); do
|
||||
for i in {1..5}; do
|
||||
# Remove status file so that we retry every time we flake
|
||||
rm -f /var/lib/private/rpm-ostree-countme/countme
|
||||
# Update the journal cursor
|
||||
|
||||
@@ -23,30 +23,30 @@ set -xeuo pipefail
|
||||
. "$KOLA_EXT_DATA/commonlib.sh"
|
||||
|
||||
# Try five times to create the toolbox to avoid container registry infra flakes
|
||||
for i in $(seq 1 5); do
|
||||
machinectl shell core@ /bin/toolbox create --assumeyes 1>/dev/null
|
||||
if [[ $(machinectl shell core@ /bin/toolbox list --containers | grep --count fedora-toolbox-) -ne 1 ]]; then
|
||||
for i in {1..5}; do
|
||||
machinectl -q shell core@ /bin/toolbox create --assumeyes 1>/dev/null
|
||||
if [[ $(machinectl -qE TERM=dumb shell core@ /bin/toolbox list --containers | grep --count fedora-toolbox-) -ne 1 ]]; then
|
||||
echo "Could not create toolbox on try: $i"
|
||||
sleep 10
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ $(machinectl shell core@ /bin/toolbox list --containers | grep --count fedora-toolbox-) -ne 1 ]]; then
|
||||
if [[ $(machinectl -qE TERM=dumb shell core@ /bin/toolbox list --containers | grep --count fedora-toolbox-) -ne 1 ]]; then
|
||||
fatal "Could not create toolbox"
|
||||
fi
|
||||
ok toolbox create
|
||||
|
||||
machinectl shell core@ /bin/toolbox run touch ok_toolbox
|
||||
machinectl -q shell core@ /bin/toolbox run touch ok_toolbox
|
||||
if [[ ! -f '/home/core/ok_toolbox' ]]; then
|
||||
fatal "Could not run a simple command inside a toolbox"
|
||||
fi
|
||||
ok toolbox run
|
||||
|
||||
toolbox="$(machinectl shell core@ /bin/toolbox list --containers | grep fedora-toolbox- | awk '{print $2}')"
|
||||
machinectl shell core@ /bin/podman stop "${toolbox}"
|
||||
machinectl shell core@ /bin/toolbox rm "${toolbox}"
|
||||
if [[ -n "$(machinectl shell core@ /bin/toolbox list --containers)" ]]; then
|
||||
toolbox="$(machinectl -qE TERM=dumb shell core@ /bin/toolbox list --containers | awk '/fedora-toolbox-/ {print $2}')"
|
||||
machinectl -q shell core@ /bin/podman stop "${toolbox}"
|
||||
machinectl -q shell core@ /bin/toolbox rm "${toolbox}"
|
||||
if [[ -n "$(machinectl -qE TERM=dumb shell core@ /bin/toolbox list --containers)" ]]; then
|
||||
fatal "Could not remove the toolbox container"
|
||||
fi
|
||||
ok toolbox rm
|
||||
|
||||
Reference in New Issue
Block a user