1
0
mirror of https://github.com/systemd/systemd synced 2026-03-16 18:14:46 +01:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Luca Boccassi
f144f6faa9
Merge pull request #19669 from mrc0mmand/ci-mkosi-arch
ci: work around #19442 to make CI happy again
2021-05-20 10:14:30 +01:00
Frantisek Sumsal
27b4d60678 ci: skip root tty login
We use the `autologin` mkosi option (see
mkosi.default.d/10-systemd.conf), so the pexpect root login throws
a (harmless) error:

```
Arch Linux (built from systemd tree)
Kernel 5.4.0-1047-azure on an x86_64 (console)

image login: root (automatic login)

root
root
[root@image ~]# systemctl poweroff
root
-bash: root: command not found
[root@image ~]# systemctl poweroff
```
2021-05-19 23:07:25 +02:00
Frantisek Sumsal
715a273b10 ci: show image summary 2021-05-19 23:07:25 +02:00
Frantisek Sumsal
48a3cf58d5 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.
2021-05-19 23:07:19 +02:00
2 changed files with 10 additions and 4 deletions

View File

@ -48,8 +48,17 @@ jobs:
- name: Build ${{ matrix.distro }} - name: Build ${{ matrix.distro }}
run: sudo python3 -m mkosi --password= --qemu-headless build run: sudo python3 -m mkosi --password= --qemu-headless build
- name: Show ${{ matrix.distro }} image summary
run: sudo python3 -m mkosi --password= --qemu-headless summary
# 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 - 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 - name: Boot ${{ matrix.distro }} QEMU
run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless qemu run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless qemu

View File

@ -8,9 +8,6 @@ import sys
def run() -> None: def run() -> None:
p = pexpect.spawnu(" ".join(sys.argv[1:]), logfile=sys.stdout, timeout=300) p = pexpect.spawnu(" ".join(sys.argv[1:]), logfile=sys.stdout, timeout=300)
p.expect("login:")
p.sendline("root")
p.expect("#") p.expect("#")
p.sendline("systemctl poweroff") p.sendline("systemctl poweroff")