-
Notifications
You must be signed in to change notification settings - Fork 284
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
XSI-1773 clean up swtpm service files #6193
XSI-1773 clean up swtpm service files #6193
Conversation
cace65f
to
3e2f3f4
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.
Fe_systemctl.stop
unlinks the service file, if it exists.
This might not be enough for all cases, but probably covers most of them. Do we need to clean up before creating a service? |
ocaml/xenopsd/xc/service.ml
Outdated
@@ -619,15 +619,14 @@ module SystemdDaemonMgmt (D : DAEMONPIDPATH) = struct | |||
match (of_domid domid, is_running ~xs domid) with |
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 (existing code) is makes some unnecessary calls, as is_running
also calls of_domid
internally. And now we don't even care about the result of is_running
in the systemd case. So better would be to drop is_running
from the match and call Compat.is_running ~xs domid
in the None
case below.
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 think it's a good fix, but we can easily make it more efficient too.
We have seen swtpm systemd service files not being removed. We now call Fe_systemctl.stop even when the servive is potentially not running to ensure clean up is happening regardless. Signed-off-by: Christian Lindig <[email protected]>
3e2f3f4
to
3d394e0
Compare
We have seen swtpm systemd service files not being removed. We now make Fe_systemctl.stop callable when the servive is potentially not running to ensure clean up is happening regardless.