-
Notifications
You must be signed in to change notification settings - Fork 157
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
ignition-ostree: make sure we don't mount /sysroot before transposefs #2526
Conversation
Without more details in the commit message or comments here I would classify this as a workaround. i.e. we know that when multipath is enabled the autosave-xfs stuff will fail, but we don't know why. Does the problem that autosave-xfs solve still happen on multipath? Should it work? Is there an underlying bug we need to investigate and figure out? Do we want it to work in the future? Should we add a test for it when it does work? |
Oh yeah this is a workaround, I am trying a possible real fix too. Just opened this in case we needed to provide them an urgent workaround. With this workaround: |
OK. Thanks for the context! |
971019d
to
a35dbbc
Compare
overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-transposefs.sh
Outdated
Show resolved
Hide resolved
overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-transposefs.sh
Outdated
Show resolved
Hide resolved
overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-transposefs.sh
Outdated
Show resolved
Hide resolved
overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-transposefs.sh
Outdated
Show resolved
Hide resolved
a35dbbc
to
2290d44
Compare
Now this, ends up in the same place as the reported issue.
I continue debugging. |
This boots correctly and does not seem to cause any errors, multipath devices are still being used when I check |
1f0cbce
to
5d70098
Compare
When enabling multipath the ignition-ostree-mount-firstboot-sysroot service loses to the systemd's generator, which causes /sysroot to be mounted before we finish transposing the fs. This change makes sure we wait to mount the /sysroot until we are done. This was reported via: https://issues.redhat.com/browse/OCPBUGS-16157
5d70098
to
80f6765
Compare
80f6765
to
1ed8684
Compare
Tested these 4 variants and all boot OK.
|
etc 🎉 What we could do as a followup is a new kola test which expands to a big size with mpath but this LGTM |
Adding test issue so I don't forget: #2533. I will get to this ASAP. |
After=ignition-ostree-growfs.service | ||
Before=initrd-root-fs.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK now that I look I think I'm starting to understand this better. Before this PR, we only had Before=ignition-ostree-transposefs-restore.service
on this service, which is itself just Before=ignition-ostree-mount-firstboot-sysroot.service
.
Yet that service is just a no-op if we have a root
kernel argument.
So there were no constraints and we just end up racing.
So the multipath bits exposed this core race condition because it is done via a root=
karg.
Before=initrd-root-fs.target | ||
Before=sysroot.mount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 100% fine, but I'd note that normally sysroot.mount
is itself Before=initrd-root-fs.target
, so we could just be Before=sysroot.mount
too.
Or maybe the simple way to say it is: anywhere we have Before=ignition-ostree-mount-firstboot-sysroot.service
we also need Before=sysroot.mount
.
https://issues.redhat.com/browse/OCPBUGS-16157