From d0a3f156b26f4a32903ac435ed3a47acb93ed705 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 30 Mar 2017 12:42:31 -0400 Subject: [PATCH] mon/ConfigKeyService: wait for quorum Among other things, this prevents a mgr activation stall if it happens to request config-keys from a mon that is out of quorum. Signed-off-by: Sage Weil --- src/mon/ConfigKeyService.cc | 3 ++- src/mon/Monitor.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mon/ConfigKeyService.cc b/src/mon/ConfigKeyService.cc index df180b7a636df..8d083199331ed 100644 --- a/src/mon/ConfigKeyService.cc +++ b/src/mon/ConfigKeyService.cc @@ -91,7 +91,8 @@ bool ConfigKeyService::service_dispatch(MonOpRequestRef op) dout(10) << __func__ << " " << *m << dendl; if (!in_quorum()) { - dout(1) << __func__ << " not in quorum -- ignore message" << dendl; + dout(1) << __func__ << " not in quorum -- waiting" << dendl; + paxos->wait_for_readable(op, new Monitor::C_RetryMessage(mon, op)); return false; } diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 77741ad6e4ddf..0a6bc310b0f7d 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -655,6 +655,7 @@ public: friend class MonmapMonitor; friend class PGMonitor; friend class LogMonitor; + friend class ConfigKeyService; QuorumService *health_monitor; QuorumService *config_key_service; -- 2.39.5