mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum

The path use quorum instead of monMap to determine if there is enough mon. (bug #10165).

Signed-off-by: FengJiankui <fengjiankui@inspur.com>
This commit is contained in:
FengJiankui committed 2022-04-29 09:46:21 +08:00
1 parent 21db07bc04
commit d335dc59eb
1 file changed
+1 -1
+1 -1
View File
@@ -161,7 +161,7 @@ func (c *Cluster) checkHealth() error {
} else {
// when the mon isn't in the clusterInfo, but is in quorum and there are
// enough mons, remove it else remove it on the next run
if inQuorum && len(quorumStatus.MonMap.Mons) > desiredMonCount {
if inQuorum && len(quorumStatus.Quorum) > desiredMonCount {
logger.Warningf("mon %q not in source of truth but in quorum, removing", mon.Name)
if err := c.removeMon(mon.Name); err != nil {
logger.Warningf("failed to remove mon %q. %v", mon.Name, err)