]> git-server-git.apps.pok.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>
Mon, 4 Mar 2024 11:48:04 +0000 (13:48 +0200)
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
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 e75a5765902569509eea4d8881bdc446769acbc0..16cad364182429cf9c9c564339efb378ad0aee7b 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