diff --git a/ocaml/database/master_connection.ml b/ocaml/database/master_connection.ml index ed9bfbd2826..d7faff1cd62 100644 --- a/ocaml/database/master_connection.ml +++ b/ocaml/database/master_connection.ml @@ -235,24 +235,17 @@ let do_db_xml_rpc_persistent_with_reopen ~host:_ ~path (req : string) : let time_sofar = Unix.gettimeofday () -. time_call_started in if !connection_timeout < 0. then ( if not !surpress_no_timeout_logs then ( - debug - "Connection to master died. I will continue to retry indefinitely \ - (supressing future logging of this message)." ; error "Connection to master died. I will continue to retry indefinitely \ - (supressing future logging of this message)." - ) ; - surpress_no_timeout_logs := true + (supressing future logging of this message)." ; + surpress_no_timeout_logs := true + ) ) else debug "Connection to master died: time taken so far in this call '%f'; will \ %s" time_sofar - ( if !connection_timeout < 0. then - "never timeout" - else - Printf.sprintf "timeout after '%f'" !connection_timeout - ) ; + (Printf.sprintf "timeout after '%f'" !connection_timeout) ; if time_sofar > !connection_timeout && !connection_timeout >= 0. then if !restart_on_connection_timeout then ( debug "Exceeded timeout for retrying master connection: restarting xapi" ; diff --git a/ocaml/xapi/xapi.ml b/ocaml/xapi/xapi.ml index fd5c0650266..f4e9a6f0f68 100644 --- a/ocaml/xapi/xapi.ml +++ b/ocaml/xapi/xapi.ml @@ -1218,7 +1218,6 @@ let server_init () = , [] , Monitor_master.update_configuration_from_master ) - ; ("Initialising licensing", [], handle_licensing) ; ( "message_hook_thread" , [Startup.NoExnRaising] , Xapi_message.start_message_hook_thread ~__context @@ -1252,6 +1251,7 @@ let server_init () = , [Startup.OnlyMaster] , check_no_other_masters ) + ; ("Initialising licensing", [], handle_licensing) ; ( "Registering periodic functions" , [] , fun () -> Xapi_periodic_scheduler_init.register ~__context