Skip to content

Commit 23c74ba

Browse files
committed
tests/kola: temporarily add x-initrd.attach workaround to soft-reboot test
Manually add x-initrd.attach to crypttab if not already present so the test can validate the fix against images that don't yet include coreos/ignition#2219. This commit should be reverted once the Ignition fix is in the base image.
1 parent fe85b89 commit 23c74ba

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • tests/kola/root-reprovision/luks/soft-reboot

tests/kola/root-reprovision/luks/soft-reboot/test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in
2525
[[ ${blktype} == crypt ]]
2626
ok "root is on LUKS device"
2727

28+
# Workaround: manually add x-initrd.attach to crypttab if not
29+
# already present. This can be removed once coreos/ignition#2219
30+
# is included in the base image.
31+
if ! grep -q x-initrd.attach /etc/crypttab; then
32+
sed -i '/^myluksdev /s/$/,x-initrd.attach/' /etc/crypttab
33+
systemctl daemon-reload
34+
fi
35+
2836
/tmp/autopkgtest-soft-reboot soft-rebooted
2937
;;
3038

0 commit comments

Comments
 (0)