Skip to content

CA-403759: Initialise licensing after no-other-masters check #6257

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

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions ocaml/database/master_connection.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;
Expand Down
2 changes: 1 addition & 1 deletion ocaml/xapi/xapi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading