Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

topology_recovery: Failure: no replica promoted #1316

@vinaypanday

Description

@vinaypanday

Hi @shlomi-noach ,

Hope you are doing well.!

I have a orchestrator running for the production which have multiple cluster, yesterday one of the master in a particular cluster got failed but orchestrator did not promoted candidate master to a new maser (failover failed), when I started debugging I found
INFO topology_recovery: Failure: no replica promoted.. in the logs.

concerned cluster topology

10.2.9.215 Master
10.2.9.67 Candidate Master
10.2.9.202 Slave
10.2.9.203 Slave

orchestrator.conf.json

"PromotionIgnoreHostnameFilters": ["10.2.9.202","10.2.9.203","10.2.9.6","10.2.9.167"],

Code :instance_topology.go

func IsBannedFromBeingCandidateReplica(replica *Instance) bool {
	if replica.PromotionRule == MustNotPromoteRule {
		log.Debugf("instance %+v is banned because of promotion rule", replica.Key)
		return true
	}
	for _, filter := range config.Config.PromotionIgnoreHostnameFilters {
		if matched, _ := regexp.MatchString(filter, replica.Key.Hostname); matched {
			return true
		}
	}
	return false
}

The above function is returning true when 10.2.9.67 is being compared in PromotionIgnoreHostnameFilters list due to 10.2.9.6 and 10.2.9.167 therefore promotion is not happening.

Please check and fix.

Thanks in advance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions