Skip to content

Commit

Permalink
XSI-1722 fix timer for host heartbeat
Browse files Browse the repository at this point in the history
In XSI-1722 we notice that xapi does not detect a host being offline
based on the heartbeat. The reason is a bug: we miss to store a new
timer in the corresponding hash table.

Signed-off-by: Christian Lindig <christian.lindig@cloud.com>
  • Loading branch information
Christian Lindig committed Oct 9, 2024
1 parent f45e406 commit 52d21c0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ocaml/xapi/db_gc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ let check_host_liveness ~__context =
| Some x ->
x
| None ->
Clock.Timer.start
~duration:!Xapi_globs.host_assumed_dead_interval
let t =
Clock.Timer.start
~duration:!Xapi_globs.host_assumed_dead_interval
in
Hashtbl.replace host_heartbeat_table host t ;
t
)
in
if not (Clock.Timer.has_expired timer) then
Expand Down

0 comments on commit 52d21c0

Please sign in to comment.