diff --git a/ocaml/xapi/xapi_globs.ml b/ocaml/xapi/xapi_globs.ml index 5137862c83f..3fa03d200ee 100644 --- a/ocaml/xapi/xapi_globs.ml +++ b/ocaml/xapi/xapi_globs.ml @@ -610,7 +610,7 @@ let old_hp_bios_strings = "hp-rombios", "COMPAQ"] -let permanent_master_failure_retry_timeout = 5. *. 60. (* 5 minutes *) +let permanent_master_failure_retry_timeout = 1. *. 60. (* 1 minute *) (** {2 CPUID feature masking} *) diff --git a/ocaml/xapi/xapi_pool.ml b/ocaml/xapi/xapi_pool.ml index 84f86337430..0feb455df46 100644 --- a/ocaml/xapi/xapi_pool.ml +++ b/ocaml/xapi/xapi_pool.ml @@ -831,7 +831,11 @@ let designate_new_master ~__context ~host = if Db.Pool.get_ha_enabled ~__context ~self:pool then raise (Api_errors.Server_error(Api_errors.ha_is_enabled, [])); - sync_database ~__context; + (* Only the master can sync the *current* database; only the master + knows the current generation count etc. *) + Helpers.call_api_functions ~__context + (fun rpc session_id -> + Client.Pool.sync_database rpc session_id); let all_hosts = Db.Host.get_all ~__context in (* We make no attempt to demand a quorum or anything. *)