Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Support LUKS devices when using guestfish to inject ignition #1118

Closed
wants to merge 1 commit into from

Conversation

Prashanth684
Copy link

Add support for recognizing LUKS filesystem when setting up ignition.
While not necessary for x86 because it uses fw_cfg, ppc64 and s390x use guestfish
and need this change for kola tests to run.

@Prashanth684 Prashanth684 force-pushed the luks-support-gf branch 2 times, most recently from ac61bd9 to 66928bc Compare November 19, 2019 15:24
@Prashanth684
Copy link
Author

Could i get some reviews for this please ? and a lgtm hopefully ? :)

platform/qemu.go Show resolved Hide resolved
platform/qemu.go Outdated Show resolved Hide resolved
@jlebon
Copy link
Member

jlebon commented Nov 19, 2019

Would be good to link to the analogous coreos-assembler change in the commit message: coreos/coreos-assembler#826.

One thing here, do we need to bump memory here as well? https://github.com/coreos/coreos-assembler/pull/826/files#diff-b67c90828c71ffa6aaa6454fa26aefa4R9-R15

@Prashanth684
Copy link
Author

Would be good to link to the analogous coreos-assembler change in the commit message: coreos/coreos-assembler#826.

One thing here, do we need to bump memory here as well? https://github.com/coreos/coreos-assembler/pull/826/files#diff-b67c90828c71ffa6aaa6454fa26aefa4R9-R15

Will add the reference to the commit. I am not sure about the memory increase. I was able to run the kola tests without that change and seemed to work fine. @cgwalters is the memory increase for guestfs needed for the kola tests?

Add support for recognizing LUKS filesystem when setting up ignition.
While not necessary for x86 because it uses fw_cfg, ppc64 and s390x use guestfish
and need this change for kola tests to run.

Introduced because of these changes: coreos/coreos-assembler#826
@cgwalters
Copy link
Member

This seems OK to me, but I think it'd be simpler to just stop mounting the rootfs - we don't need it to inject Ignition into /boot right?

@tuan-hoang1
Copy link

This seems OK to me, but I think it'd be simpler to just stop mounting the rootfs - we don't need it to inject Ignition into /boot right?

Second this. So we can just remove the rootfs mounting after all - /boot is all we need.

@Prashanth684
Copy link
Author

This seems OK to me, but I think it'd be simpler to just stop mounting the rootfs - we don't need it to inject Ignition into /boot right?

Second this. So we can just remove the rootfs mounting after all - /boot is all we need.

Yes. we could mount /boot using the guestfish debug shell, but one roadblock I hit was a way to upload a file to the partition in the debug shell. I am not a guestfish expert by any means so if someone knows of a way to do this that would be great.

@tuan-hoang1
Copy link

Using guestfish's mount command with boot partition (/dev/sda1) being as / instead of /boot if you don't want to mount rootfs (/dev/sda4) at /. Yeah it looks a little bit misleading but works:

guestfish --remote -- mount /dev/sda1 /
guestfish --remote -- mkdir-p /ignition
guestfish --remote -- upload ign.conf /ignition/ign.conf

Thinking on how to do guestfish debug sh in a nice way if you don't want above solution.

@Prashanth684
Copy link
Author

Using guestfish's mount command with boot partition (/dev/sda1) being as / instead of /boot if you don't want to mount rootfs (/dev/sda4) at /. Yeah it looks a little bit misleading but works:

guestfish --remote -- mount /dev/sda1 /
guestfish --remote -- mkdir-p /ignition
guestfish --remote -- upload ign.conf /ignition/ign.conf

Thinking on how to do guestfish debug sh in a nice way if you don't want above solution.

i think this is much better. It is misleading in the sense that we are not putting it in "/", but it is a cleaner solution. i will close this PR and open a new one. thanks @tuan-hoang1 !

Prashanth684 added a commit to Prashanth684/mantle that referenced this pull request Nov 21, 2019
With the changes made recently: coreos/coreos-assembler#826, we need to add
support for detecting LUKS root partitions which is really unnecessary as we are just injecting ignition
in the boot partition.

Based on suggestions by @cgwalters and @tuan-hoang1 in coreos#1118
@Prashanth684
Copy link
Author

opened #1124.

@Prashanth684 Prashanth684 deleted the luks-support-gf branch December 11, 2019 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants