From 52d21c08394d74958e48e73feddab273e86339d5 Mon Sep 17 00:00:00 2001 From: Christian Lindig Date: Wed, 9 Oct 2024 14:48:39 +0100 Subject: [PATCH] XSI-1722 fix timer for host heartbeat 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 --- ocaml/xapi/db_gc.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ocaml/xapi/db_gc.ml b/ocaml/xapi/db_gc.ml index 2efe11b89ee..c8c68309369 100644 --- a/ocaml/xapi/db_gc.ml +++ b/ocaml/xapi/db_gc.ml @@ -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