From 7e42824478ea24f588dabfaa8e317a99a0cee8cc Mon Sep 17 00:00:00 2001 From: Leonid Usov Date: Thu, 15 Feb 2024 15:15:09 +0200 Subject: [PATCH] mds/quiesce: only use ACTIVE daemons for the quiesce cluster Signed-off-by: Leonid Usov --- src/mds/MDSRankQuiesce.cc | 3 ++- src/pybind/mgr/mgr_module.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mds/MDSRankQuiesce.cc b/src/mds/MDSRankQuiesce.cc index 27425497b14..0b753865698 100644 --- a/src/mds/MDSRankQuiesce.cc +++ b/src/mds/MDSRankQuiesce.cc @@ -253,7 +253,8 @@ void MDSRank::quiesce_cluster_update() { for (auto&& [gid, info] : mdsmap->get_mds_info()) { // if it has a rank and state <= ACTIVE, it's good enough - if (info.rank != MDS_RANK_NONE && info.state <= MDSMap::STATE_ACTIVE) { + // if (info.rank != MDS_RANK_NONE && info.state <= MDSMap::STATE_ACTIVE) { + if (info.rank != MDS_RANK_NONE && info.state == MDSMap::STATE_ACTIVE) { member_info.push(&info); membership.members.insert(info.global_id); } diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index e75a5765902..16cad364182 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -1774,7 +1774,7 @@ class MgrModule(ceph_module.BaseMgrModule, MgrModuleLoggingMixin): state_ord = self.MDS_STATE_ORD.get(info['state']) leader_state_ord = self.MDS_STATE_ORD.get(leader_info['state']) - if state_ord <= self.MDS_STATE_ACTIVE_ORD and state_ord > leader_state_ord: + if state_ord == self.MDS_STATE_ACTIVE_ORD and state_ord > leader_state_ord: leader_info = info break -- 2.39.5