Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a systemd generator to fixup Anaconda's /etc/fstab #417

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

cgwalters
Copy link
Collaborator

Add a systemd generator to fixup Anaconda's /etc/fstab

This is a giant and hacky workaround for
ostreedev/ostree#3193

The better real fix is probably in either systemd or anaconda
(more realistically both) but let's paper over things here for now.

Having code to run as a generator will likely be useful in the
future anyways.

Signed-off-by: Colin Walters walters@verbum.org


/// A workaround for https://github.com/ostreedev/ostree/issues/3193
/// as generated by anaconda.
#[context("Updating /etc/fstab for anaconda+composefs")]
pub(crate) fn fixup_etc_fstab(root: &Dir) -> Result<()> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to say one really nice thing about pervasively using cap-std is that it makes it trivial to unit-test things like this in a super reliable fashion without accidentally trying to edit the system global /etc/fstab when running cargo test and also without going all the way to running containers. (Which we should do too of course...)

@cgwalters
Copy link
Collaborator Author

@henrywang we aren't testing anaconda in our integration tests yet, right? Do you know offhand how hard that'd be to wire up?

A great thing to do here would be to change the tests to verify no systemd units fail across the board, which is the goal of this change.

@henrywang
Copy link
Contributor

@henrywang we aren't testing anaconda in our integration tests yet, right? Do you know offhand how hard that'd be to wire up?

A great thing to do here would be to change the tests to verify no systemd units fail across the board, which is the goal of this change.

We have anaconda test in virt-s1/bootc-workflow-test with a daily run already. https://github.com/virt-s1/bootc-workflow-test/blob/main/anaconda.sh. Adding anaconda test into bootc repo is not hard.

@cgwalters
Copy link
Collaborator Author

Ah OK. Yeah I think it could be an opt-in? Well...here's what I'd propose...let's land this change and then it will show up very quickly in the -dev images, and the workflow test runs against our -dev images and we can verify it works there?

@henrywang
Copy link
Contributor

Ah OK. Yeah I think it could be an opt-in? Well...here's what I'd propose...let's land this change and then it will show up very quickly in the -dev images, and the workflow test runs against our -dev images and we can verify it works there?

Exactly. -dev image will be tested every day, or it can be manually triggered as well.

@henrywang
Copy link
Contributor

henrywang commented Mar 22, 2024

@cgwalters One more question. Does anaconda support bootc install already? Still has a discussion about bootc install support in rhinstaller/anaconda#5197. Thanks.

@cgwalters
Copy link
Collaborator Author

@cgwalters One more question. Does anaconda support bootc install already? Thanks.

No, that's rhinstaller/anaconda#5197

This is a giant and hacky workaround for
ostreedev/ostree#3193

The better real fix is probably in either systemd or anaconda
(more realistically both) but let's paper over things here for now.

Having code to run as a generator will likely be useful in the
future anyways.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Contributor

@jeckersb jeckersb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, love the tests!

@jeckersb jeckersb merged commit 2a35059 into containers:main Mar 25, 2024
15 checks passed
@henrywang
Copy link
Contributor

@cgwalters Anaconda test passed with bootc-202403251937.g0c250ea906-1.el9.x86_64 . Test log: virt-s1/bootc-workflow-report#205

@cgwalters
Copy link
Collaborator Author

Yep cool, I no longer see the systemd-remount-fs.service failures in that -dev run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants