-
Notifications
You must be signed in to change notification settings - Fork 114
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
Minor improvments for systemd mode implementation #531
Minor improvments for systemd mode implementation #531
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
@adrianchiris @e0ne @SchSeba please check this PR. Thanks |
8553141
to
a1a5ade
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
Pull Request Test Coverage Report for Build 6709601933
💛 - Coveralls |
@@ -572,14 +572,23 @@ func (dn *Daemon) nodeStateSyncHandler() error { | |||
// or there is a new config we need to apply | |||
// When using systemd configuration we write the file | |||
if dn.useSystemdService { | |||
r, err := systemd.WriteConfFile(latestState, dn.devMode, dn.platform) | |||
systemdConfModified, err := systemd.WriteConfFile(latestState, dn.devMode, dn.platform) |
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 a great opportunity to clean this up using https://github.com/coreos/go-systemd
Can you refactor and get rid of all the manual systemd calls? The above library is the official one. That would mean we can clean up pkg/systemd/systemd.go by using that lib.
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.
Hi @bn222 that package is great does it only work for RHEL/COREOS or also other operating systems?
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.
@bn222 can you open an issue for this ? i do not want to turn this bug fix into a refactor.
indeed it must not be limited to RHEL/CoreOS
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 agree that this is a good idea to switch to the library, but let's handle this as a separate PR with refactoring.
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.
@SchSeba I believe it works in general.
@adrianchiris The downside of having a separate PR is that it tends to get forgotten. I've opened #533, so let's not let it linger for too long.
/lgtm |
@ykulazhenkov can you rebase this one ? |
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
@ykulazhenkov please rebase
a1a5ade
to
4a8ca13
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
When systemd configuration mode is used we need to make sure that the systemd service in not only exist but also is in enabled state. Signed-off-by: Yury Kulazhenkov <[email protected]>
This is required to ensure that we will not read outdated result in edge case scenarios, e.g. when systemd service exist but for some reason was disabled by the user. Signed-off-by: Yury Kulazhenkov <[email protected]>
4a8ca13
to
f1afab5
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
PR rebased |
/test-all |
lgtm |
Couple improvements for systemd mode implementation to cover edge cases:
The original implementation can't detect situation when the service exists on the node, but for some reason was disabled by the user. In this case daemon was not able to detect this misconfiguration.