Skip to content
Merged
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
11 changes: 8 additions & 3 deletions ocaml/xapi/xapi_periodic_scheduler_init.ml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,14 @@ let register ~__context =
let remaining = Int64.sub expiry_time current_time in
Xapi_host.schedule_disable_ssh_job ~__context ~self ~timeout:remaining
~auto_mode:true
(* handle the case where XAPI is not active when the SSH timeout expires *)
else if Fe_systemctl.is_active ~service:!Xapi_globs.ssh_service then
Xapi_host.disable_ssh ~__context ~self
(* Handle the case where XAPI is not active when the SSH timeout expires.
This typically occurs when XAPI has been down for an extended period that
exceeds the timeout duration. In this scenario, we need to enable SSH auto
mode to ensure the SSH service remains continuously available. *)
else if Fe_systemctl.is_active ~service:!Xapi_globs.ssh_service then (
Xapi_host.disable_ssh ~__context ~self ;
Xapi_host.set_ssh_auto_mode ~__context ~self ~value:true
)
in
let update_all_subjects_delay = 10.0 in
(* initial delay = 10 seconds *)
Expand Down
Loading