diff --git a/ocaml/xapi/xapi_clustering.ml b/ocaml/xapi/xapi_clustering.ml index d71d412f6e6..7bb881b0291 100644 --- a/ocaml/xapi/xapi_clustering.ml +++ b/ocaml/xapi/xapi_clustering.ml @@ -486,7 +486,7 @@ let on_corosync_update ~__context ~cluster updates = __FUNCTION__ (Printexc.to_string exn) let create_cluster_watcher_on_master ~__context ~host = - if Helpers.is_pool_master ~__context ~host then ( + if Helpers.is_pool_master ~__context ~host then let watch () = while !Daemon.enabled do let m = @@ -515,6 +515,16 @@ let create_cluster_watcher_on_master ~__context ~host = Thread.delay 3. done in - debug "%s: create watcher for corosync-notifyd on master" __FUNCTION__ ; - ignore @@ Thread.create watch () - ) + let feature_enabled = + let pool = Helpers.get_pool ~__context in + let restrictions = Db.Pool.get_restrictions ~__context ~self:pool in + List.assoc_opt "restrict_cluster_health" restrictions = Some "false" + in + if feature_enabled then ( + debug "%s: create watcher for corosync-notifyd on master" __FUNCTION__ ; + ignore @@ Thread.create watch () + ) else + debug + "%s: not creating watcher for corosync-notifyd: feature cluster_health \ + not enabled" + __FUNCTION__