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

prepare-var: Do not remount stateroot var in-place, and unmount the temporary var mount after real /var is mounted #3363

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ruihe774
Copy link
Contributor

This is split out of some merge-ready commits in #3358.

Currently, in ostree-prepare-root, we create a read-writable bind-mount of /sysroot/ostree/deploy/$stateroot/var in-place, and in a unit generated by ostree-system-generator, it is then bind-mounted to /var. This approach causes some problem:

  • We have to make the mount slave+shared to prevent sub-mounts from being propagated into /sysroot/ostree/deploy/$stateroot/var.
  • We need to write some bootloader-specific code in ostree-system-generator to get the path to stateroot.
  • /sysroot/ostree/deploy/$stateroot/var is not unmounted afterwards, polluting the global mount namespace.

This PR tries to solving these problem by instead of bind-mounting var in-place, bind-monting it to /run/ostree/.private/var in ostree-prepare-root. In this way, ostree-system-generator can bind-mount a fixed path to /var, and the mount is not necessary to be made slave+shared. Also, ostree-system-generator creates a service ostree-unmount-temp-var.service that unmounts the temporary mount of var after real /var is mounted.

Copy link

openshift-ci bot commented Dec 20, 2024

Hi @ruihe774. 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.

@github-actions github-actions bot added the area/prepare-root Issue relates to ostree-prepare-root label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prepare-root Issue relates to ostree-prepare-root needs-ok-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant