Skip to content

Commit

Permalink
XSI-1722 fix timer for host heartbeat (#6048)
Browse files Browse the repository at this point in the history
In XSI-1722 we notive that xapi does not detect a host beeing offline
based on the heartbeat. The reason is a bug: we miss to store a new
timer in the corresponding hashtable.
  • Loading branch information
lindig authored Oct 9, 2024
2 parents 8e3cb5f + 52d21c0 commit 0c7b7e4
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 0c7b7e4

Please sign in to comment.