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 simple service to comment / in fstab #3372

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

champtar
Copy link

ostree modes have conflictings / mount needs:

  • "hardlinks" mode need / to be rw
  • composefs mode need / to be ro

Some installation methods (at least Anaconda) add / to fstab, so when systemd-remount-fs.service tries to remount the composefs / rw, it fails because it can only be ro.

To be able to edit /etc this early during the boot it rely on having the 'rw' kargs.

bootc has a systemd generator to edit fstab but not everyone uses bootc (yet).

Fixes #3193

Notes:
This was tested with EL 9.5
The idea is to have a common fix for this step towards composefs, maybe disabled by default in the packages but ready to use by image maintainers if they know its safe

Copy link

openshift-ci bot commented Jan 18, 2025

Hi @champtar. Thanks for your PR.

I'm waiting for a ostreedev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

ostree modes have conflictings / mount needs:
- "hardlinks" mode need / to be rw
- composefs mode need / to be ro

Some installation methods (at least Anaconda) add / to fstab,
so when systemd-remount-fs.service tries to remount
the composefs / rw, it fails because it can only be ro.

To be able to edit /etc this early during the boot it rely on
having the 'rw' kargs.

bootc has a systemd generator to edit fstab but not everyone uses bootc (yet).
@champtar
Copy link
Author

Seeing https://bugzilla.redhat.com/show_bug.cgi?id=2332319#c1, I will change the regex a bit to match ' defaults '

@champtar champtar marked this pull request as draft January 18, 2025 03:42
@cgwalters
Copy link
Member

Only tangential to this PR: 👋 @champtar thanks for all of your recent comments and work, it'd very much appreciated! I would like to help support you for sure as well. One thing on the back of my mind is to try to recreate an "ostree/bootc community dev meeting" and you'd be one of the people I'd like to invite and make sure we can work through design and goals etc.

Moving on to the actual issue at hand here:

bootc has a systemd generator to edit fstab but not everyone uses bootc (yet).

Yes, but that systemd generator runs even if bootc is not used - so it should just work to add bootc to your image, right? Any reason that would be a problem for you?

I'm not opposed inherently to carrying a reimplementation of that here, but I'm certainly not excited by it, especially in shell script. The bootc version has unit tests, etc.

After=systemd-fsck-root.service
Before=bootc-fstab-edit.service systemd-remount-fs.service local-fs-pre.target local-fs.target shutdown.target
Wants=local-fs-pre.target
ConditionPathIsReadWrite=/etc
Copy link
Member

Choose a reason for hiding this comment

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

Missing ConditionPathExists=/etc/fstab too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

systemd-remount-fs.service fail with composefs enabled
2 participants