Skip to content

Commit 3e2f3f4

Browse files
author
Christian Lindig
committed
XSI-1773 clean up swtpm service files
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]>
1 parent 90b0faf commit 3e2f3f4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ocaml/xenopsd/xc/service.ml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -619,15 +619,14 @@ module SystemdDaemonMgmt (D : DAEMONPIDPATH) = struct
619619
match (of_domid domid, is_running ~xs domid) with
620620
| None, true ->
621621
Compat.stop ~xs domid
622-
| Some service, true ->
623-
(* xenstore cleanup is done by systemd unit file *)
624-
let (_ : Fe_systemctl.status) = Fe_systemctl.stop ~service in
625-
()
626-
| Some service, false ->
627-
info "Not trying to stop %s since it's not running" service
628622
| None, false ->
629623
info "Not trying to stop %s for domid %i since it's not running" D.name
630624
domid
625+
| Some service, _ ->
626+
(* xenstore cleanup is done by systemd unit file; we are calling
627+
stop in any case to clean up *)
628+
let (_ : Fe_systemctl.status) = Fe_systemctl.stop ~service in
629+
()
631630

632631
let start_daemon ~path ~args ~domid () =
633632
debug "Starting daemon: %s with args [%s]" path (String.concat "; " args) ;

0 commit comments

Comments
 (0)