From cca43a4956c3e1db8584622d322d456d34beab74 Mon Sep 17 00:00:00 2001 From: Vincent Liu Date: Wed, 10 Jul 2024 11:25:39 +0100 Subject: [PATCH] Feature flag the cstack_sync call Signed-off-by: Vincent Liu --- ocaml/xapi/xapi_cluster.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ocaml/xapi/xapi_cluster.ml b/ocaml/xapi/xapi_cluster.ml index 26fc0317ac2..cfa55fde2c7 100644 --- a/ocaml/xapi/xapi_cluster.ml +++ b/ocaml/xapi/xapi_cluster.ml @@ -296,6 +296,8 @@ let pool_resync ~__context ~self:_ = find or create a matching cluster_host which is also enabled *) let cstack_sync ~__context ~self = - debug "%s: sync db data with cluster stack" __FUNCTION__ ; - Watcher.on_corosync_update ~__context ~cluster:self - ["Updates due to cluster api calls"] + if Xapi_cluster_helpers.cluster_health_enabled ~__context then ( + debug "%s: sync db data with cluster stack" __FUNCTION__ ; + Watcher.on_corosync_update ~__context ~cluster:self + ["Updates due to cluster api calls"] + )