mds/quiesce: only use ACTIVE daemons for the quiesce cluster

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
This commit is contained in:
Leonid Usov 2024-02-15 15:15:09 +02:00
parent 82f3dbc3ef
commit 7e42824478
2 changed files with 3 additions and 2 deletions

View 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);
}

View 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