-
Notifications
You must be signed in to change notification settings - Fork 20
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
systemd-sysext.service.d: add drop-in for OEM partition mount actions #69
Conversation
This pulls in flatcar/init#69 to restore the OEM partition mount point after the /usr overlay is done.
dc973c9
to
64558d5
Compare
This pulls in flatcar/init#69 to restore the OEM partition mount point after the /usr overlay is done.
64558d5
to
50b473a
Compare
This pulls in flatcar/init#69 to restore the OEM partition mount point after the /usr overlay is done.
@@ -0,0 +1,12 @@ | |||
[Unit] | |||
Before=oem-gce.service waagent.service amazon-ssm-agent.service vmtoolsd.service nvidia.service |
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.
I don't understand why this is necessary - systemd-sysext is a Before=sysinit.target
service so these should already be ordered correctly.
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.
Yes, it's not necessary at the moment, it's more a precaution in case DefaultDependencies=no
would be used in one of them.
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.
I thought it would be good to have even if this workaround won't be needed for too long hopefully. I can add a comment.
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.
Maybe you could also document how did you come up with this list?
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.
Actually it is required for oem-gce-enable-oslogin.service
to prevent having it fail.
Yes, added coreos-overlay:coreos-base/oem-*/files/units/*service
as a hint
50b473a
to
c7d0fd9
Compare
@@ -0,0 +1,12 @@ | |||
[Unit] | |||
Before=oem-gce.service waagent.service amazon-ssm-agent.service vmtoolsd.service nvidia.service |
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.
Maybe you could also document how did you come up with this list?
When systemd-sysext sets up the new /usr mount, the OEM partition remains mounted but the mount point is not visible anymore. This breaks access to grub.cfg, oem-release, and any OEM tools. Add a drop-in for the systemd-sysext service to first unmount the OEM partition to prevent stale mounts from piling up that cause the usr-share-oem.mount unit to fail on stop, and then mount the OEM partition again when systemd-sysext did its work. At the moment a "ExecStopPre" action does not exist in systemd and luckily is not needed because systemd-sysext removes the OEM mount together with the overlay mounts. The lazy unmount makes it possible to unmount while a process from the OEM tools is running. In the future we can try to move the OEM mountpoint under /mnt or /run and make /usr/share/oem a symlink to it.
c7d0fd9
to
4671910
Compare
This pulls in flatcar/init#69 to restore the OEM partition mount point after the /usr overlay is done.
This pulls in flatcar/init#69 to restore the OEM partition mount point after the /usr overlay is done.
This pulls in flatcar/init#69 to restore the OEM partition mount point after the /usr overlay is done.
When systemd-sysext sets up the new /usr mount, the OEM partition
remains mounted but the mount point is not visible anymore. This breaks
access to grub.cfg, oem-release, and any OEM tools.
Add a drop-in for the systemd-sysext service to first unmount the OEM
partition to prevent stale mounts from piling up that cause the
usr-share-oem.mount unit to fail on stop, and then mount the OEM
partition again when systemd-sysext did its work. At the moment a
"ExecStopPre" action does not exist in systemd and luckily is not
needed because systemd-sysext removes the OEM mount together with the
overlay mounts. The lazy unmount makes it possible to unmount while a
process from the OEM tools is running.
How to use
Check whether the OEM remount interferes with the OEM tool startup
Testing done
Manually restarted systemd-sysext on Azure (process kept running), on GCE (couldn't test because GCE is broken at the moment, see Jeremi's PRs for the fix) and on VMware ESX (process kept running). The remount on boot was finished before the OEM services started.
changelog/
directory (user-facing change, bug fix, security fix, update)↑ TODO in c-o