prepare-var: Do not remount stateroot var in-place, and unmount the temporary var mount after real /var is mounted#3363
prepare-var: Do not remount stateroot var in-place, and unmount the temporary var mount after real /var is mounted#3363ruihe774 wants to merge 4 commits intoostreedev:mainfrom
Conversation
|
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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
|
Thanks for splitting out preparatory patches like this, it's really helpful for review. At a very high level what you're saying sounds plausible, but there are quite an array of details here. In the immediate term it looks like this breaks a whole lot of the CoreOS tests (the logs are currently annoying to get at - go to the jenkins instance and download Anyways the main failure is:
The ostree initramfs handling is already quite complex on its own, but Ignition is also a huge amount of complexity in the initramfs too, and it's not surprising that a change like this would break the combination of the two. |
cgwalters
left a comment
There was a problem hiding this comment.
Marking as requested-changes because of the CI failure at least and to clear the immediate needs-review flag.
|
/ok-to-test |
|
Seems it is too difficult. I'm not working on it anymore. |
|
Thank you so much for submitting this PR and working on it though! The idea is a good one. |
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/varin-place, and in a unit generated byostree-system-generator, it is then bind-mounted to/var. This approach causes some problem:/sysroot/ostree/deploy/$stateroot/var.ostree-system-generatorto get the path to stateroot./sysroot/ostree/deploy/$stateroot/varis 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/varinostree-prepare-root. In this way,ostree-system-generatorcan bind-mount a fixed path to/var, and the mount is not necessary to be made slave+shared. Also,ostree-system-generatorcreates a serviceostree-unmount-temp-var.servicethat unmounts the temporary mount of var after real /var is mounted.