forked from coreos/fedora-coreos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We have a new Clevis release now with the fixes we need, so add the packages to the manifest. This is all that's needed to support root-on-LUKS since the rest of the rootfs replacement stack is already LUKS-aware. See added test for sample Ignition config.
- Loading branch information
Showing
8 changed files
with
135 additions
and
0 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
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
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,25 @@ | ||
{ | ||
"ignition": { | ||
"version": "3.2.0-experimental" | ||
}, | ||
"storage": { | ||
"luks": [ | ||
{ | ||
"name": "myluksdev", | ||
"device": "/dev/disk/by-partlabel/root", | ||
"clevis": { | ||
"tpm2": true | ||
}, | ||
"label": "root" | ||
} | ||
], | ||
"filesystems": [ | ||
{ | ||
"device": "/dev/mapper/myluksdev", | ||
"format": "xfs", | ||
"wipeFilesystem": true, | ||
"label": "root" | ||
} | ||
] | ||
} | ||
} |
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,31 @@ | ||
#!/bin/bash | ||
# kola: {"platforms": "qemu", "minMemory": 4096} | ||
set -xeuo pipefail | ||
|
||
srcdev=$(findmnt -nvr / -o SOURCE) | ||
[[ ${srcdev} == /dev/mapper/myluksdev ]] | ||
|
||
blktype=$(lsblk -o TYPE "${srcdev}" --noheadings) | ||
[[ ${blktype} == crypt ]] | ||
|
||
fstype=$(findmnt -nvr / -o FSTYPE) | ||
[[ ${fstype} == xfs ]] | ||
|
||
case "${AUTOPKGTEST_REBOOT_MARK:-}" in | ||
"") | ||
# check that growpart didn't run | ||
if [ -e /run/coreos-growpart.stamp ]; then | ||
echo "coreos-growpart ran" | ||
exit 1 | ||
fi | ||
|
||
# reboot once to sanity-check we can find root on second boot | ||
/tmp/autopkgtest-reboot rebooted | ||
;; | ||
|
||
rebooted) | ||
grep root=UUID= /proc/cmdline | ||
grep rd.luks.name= /proc/cmdline | ||
;; | ||
*) echo "unexpected mark: ${AUTOPKGTEST_REBOOT_MARK}"; exit 1;; | ||
esac |