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

eos-test-mode: Remount eos-live overlays in some services' namespace #413

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

starnight
Copy link
Contributor

Some systemd services start before execute eos-test-mode. And, if they mount the real storage blocks to /home in their namespace directly, then the modification under /home will be kept, even "test mode" is finished. Therefore, the filesystem is not fresh new for the real end-user.

This commit remounts the eos-live overlays by restarting the systemd services which mount a real storage block to /home in their namespace.

https://phabricator.endlessm.com/T35625

Copy link
Member

@dbnicholson dbnicholson left a comment

Choose a reason for hiding this comment

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

I think this is good enough, but I had a suggestion on matching PIDs and catching more affected mounts. I'll also note that this would always restart the services since the overlay mount would come later in the mount list. For this special purpose script, I don't think we need to get too careful, though.

eos-test-mode Outdated Show resolved Hide resolved
eos-test-mode Outdated Show resolved Hide resolved
Some systemd services start before execute eos-test-mode. And, if they
mount the real storage blocks to paths under /sysroot in their namespace
directly, then the modification under those paths will be kept, even
"test mode" is finished. Therefore, the filesystem is not fresh new for
the real end-user. This is caused by ostree making the /sysroot mount
private.

This commit remounts the eos-live overlays by restarting the systemd
services which mount a real storage block to paths under /systemd in
their namespace.

https://phabricator.endlessm.com/T35625
@starnight starnight force-pushed the T35625-service-remount-in-namespace branch from e080421 to 28e58e8 Compare August 29, 2024 06:52
@dbnicholson dbnicholson merged commit 2797071 into master Aug 29, 2024
2 checks passed
@dbnicholson dbnicholson deleted the T35625-service-remount-in-namespace branch August 29, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants