]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/quiesce: only use ACTIVE daemons for the quiesce cluster
authorLeonid Usov <leonid.usov@ibm.com>
Thu, 15 Feb 2024 13:15:09 +0000 (15:15 +0200)
committerLeonid Usov <leonid.usov@ibm.com>
Thu, 14 Mar 2024 19:07:52 +0000 (15:07 -0400)
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit 7e42824478ea24f588dabfaa8e317a99a0cee8cc)

src/mds/MDSRankQuiesce.cc
src/pybind/mgr/mgr_module.py

index 27425497b14c3fa92a0accfafe1ed7ced805b98c..0b753865698c24ec8cf29dc6f3ac7653493b9628 100644 (file)
@@ -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);
     }
index d2f0d0bc4b6d5e8fb6d1c92b709b22c7cdfdd4c1..888345c242510ab7321645b507392f324fd00f94 100644 (file)
@@ -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