-
Notifications
You must be signed in to change notification settings - Fork 246
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
internal/exec: delete enablement symlinks when disabling unit #1352
Conversation
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.
Let's add a test for this? Either in the blackbox testsuite, or as an external kola test.
Yeah, I was thinking about writing an external kola test, however, the blackbox test makes more sense here. |
cf5e0af
to
5ced5db
Compare
d54bda3
to
4aa6d50
Compare
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.
Some comments, but mostly looks sane. Seems like we could fold the second commit into the first.
4aa6d50
to
4fae855
Compare
Done! |
7f2d394
to
0f12c38
Compare
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.
LGTM
For the commit title, maybe something like:
stages/files: delete enablement symlinks when disabling unit
?
And in the body, it's good that we have links to the related issues and PRs, but let's add a bit more explanation in the commit message itself.
0f12c38
to
33b2f78
Compare
I don't think we're adding any changes to this folder |
Primarily, there're two commits bc this patch affects two folders i.e. |
33b2f78
to
ed0c1ab
Compare
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.
Changes look good; just a few nits. The commit message could still use a bit more detail; it doesn't say why we need to do this.
a38cc75
to
8585c47
Compare
For services where FCOS ships a symlink in /etc, if the user tries to disable the service via Ignition, systemd ignores the disablement directive in the preset. Avoid this behavior by deleting the enablement symlinks when disabling a unit, but continue to record the disablement in the preset file. This is a short-term solution until the upstream systemd PR (systemd/systemd#15205) is merged and widely deployed. Fixes coreos/fedora-coreos-tracker#392
8585c47
to
397aa6a
Compare
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.
👍
We need to delete any enablement symlinks for a unit before sending it to a preset directive. This will help to disable that unit completely. This is a short-term solution until the upstream systemd PR (systemd/systemd#15205) gets accepted.
Fixes coreos/fedora-coreos-tracker#392