-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that after-reset is run when in UKI mode (#2331)
* Test that after-reset is run when in UKI mode Depends on this: kairos-io/kairos-agent#245 Signed-off-by: Dimitris Karakasilis <[email protected]> * Select recovery boot entry correctly and add "debug" and "strict" to the uki-install config yaml Signed-off-by: Dimitris Karakasilis <[email protected]> * Rename db.* uki keys so that latest enki finds them Signed-off-by: Dimitris Karakasilis <[email protected]> * Print debug output (because test fails only in CI) Signed-off-by: Dimitris Karakasilis <[email protected]> * Use the correct config for uki tests Signed-off-by: Dimitris Karakasilis <[email protected]> * Remove debug output (found the issue) Signed-off-by: Dimitris Karakasilis <[email protected]> --------- Signed-off-by: Dimitris Karakasilis <[email protected]>
- Loading branch information
1 parent
3cc8bbb
commit 19919bc
Showing
9 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#cloud-config | ||
|
||
install: | ||
auto: true | ||
reboot: true | ||
device: /dev/vda | ||
grub_options: | ||
extra_cmdline: "rd.immucore.debug foobarzz" | ||
|
||
debug: true | ||
strict: true | ||
|
||
stages: | ||
initramfs: | ||
- name: "Set user and password" | ||
users: | ||
kairos: | ||
passwd: "kairos" | ||
hostname: kairos-{{ trunc 4 .Random }} | ||
after-reset: | ||
- commands: | ||
- | | ||
/bin/bash <<'EOF' | ||
#!/bin/bash | ||
set -e | ||
echo "Creating a file in COS_PERSISTENT" | ||
umount /oem || true | ||
# Close all encrypted partitions | ||
for p in $(ls /dev/mapper/vda*); do cryptsetup close $p; done | ||
/usr/lib/systemd/systemd-cryptsetup attach persistent $(findfs PARTLABEL=persistent) - tpm2-device=auto | ||
mount /dev/mapper/persistent /usr/local | ||
touch /usr/local/after-reset-file | ||
umount /dev/mapper/persistent | ||
cryptsetup close /dev/mapper/persistent | ||
EOF |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters