From 48a3cf58d5ad9cf2a4a4e6167171070b88c25369 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 19 May 2021 20:15:53 +0200 Subject: [PATCH] ci: work around #19442 to make CI happy again Let's introduce a somewhat ugly workaround for #19442 and retry the systemd-nspawn image boot test up to three times in case it dies with the dissect timeout. Since this issue occurs only in the Arch job, limit the workaround to this job only. --- .github/workflows/mkosi.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index c7508a5bd9..d1f9891062 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -48,8 +48,14 @@ jobs: - name: Build ${{ matrix.distro }} run: sudo python3 -m mkosi --password= --qemu-headless build + # Ugly workaround for systemd/systemd#19442 where systemd-nspawn + # occasionally fails with 'Failed to dissect image xxx: Connection timed out + - name: Retry the build if necessary + if: ${{ matrix.distro == 'arch' }} + run: echo "BUILD_RETRY_MAX=3" >> $GITHUB_ENV + - name: Boot ${{ matrix.distro }} systemd-nspawn - run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless boot + run: sudo -E bash +e -x -c 'for _ in $(seq 1 ${BUILD_RETRY_MAX:-1}); do ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless boot && break; done' - name: Boot ${{ matrix.distro }} QEMU run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless qemu