diff --git a/ocaml/xapi/xapi_fuse.ml b/ocaml/xapi/xapi_fuse.ml index 48d0737a613..385255a707e 100644 --- a/ocaml/xapi/xapi_fuse.ml +++ b/ocaml/xapi/xapi_fuse.ml @@ -86,6 +86,8 @@ let light_fuse_and_reboot_after_eject () = ignore (Thread.create (fun () -> + debug "%s: stop management server" __FUNCTION__ ; + Xapi_mgmt_iface.Server.stop () ; Thread.delay !Constants.fuse_time ; (* this activates firstboot script and reboots the host *) ignore diff --git a/ocaml/xapi/xapi_mgmt_iface.ml b/ocaml/xapi/xapi_mgmt_iface.ml index 5d4525172d1..5766964e09e 100644 --- a/ocaml/xapi/xapi_mgmt_iface.ml +++ b/ocaml/xapi/xapi_mgmt_iface.ml @@ -36,6 +36,9 @@ module Server : sig val current_mode : unit -> listening_mode val is_ipv6_enabled : unit -> bool + + val stop : unit -> unit + (** Stop server for external API calls *) end = struct (* Keep track of the management interface server thread. Stores a key into the table in Http_srv which identifies the server thread bound diff --git a/ocaml/xapi/xapi_mgmt_iface.mli b/ocaml/xapi/xapi_mgmt_iface.mli index 66c40d785f9..9d525ed70aa 100644 --- a/ocaml/xapi/xapi_mgmt_iface.mli +++ b/ocaml/xapi/xapi_mgmt_iface.mli @@ -15,6 +15,11 @@ * @group Networking *) +module Server : sig + val stop : unit -> unit + (** Stop server for external API calls *) +end + val himn_addr : unit -> string option (** Local IP address of the HIMN (if any) *)