stolon icon indicating copy to clipboard operation
stolon copied to clipboard

Sentinel does not consider `can-be-master` flag on initialize

Open davissp14 opened this issue 4 years ago • 2 comments

When the cluster is being initialized, the Sentinel does not honor the can-be-master flag. The keeper is instead chosen at random.

What happened: A keeper with canBeMaster set to false was elected master.

What you expected to happen: I would expect any keeper with this flag enabled to not be elected master.

How to reproduce it (as minimally and precisely as possible): Initialize any new cluster and set can-be-master to false on all members.

Anything else we need to know?: https://github.com/sorintlab/stolon/blob/057389f7e484ee1d5c1e1a7020256020e7413c87/cmd/sentinel/cmd/sentinel.go#L790-L797

https://github.com/sorintlab/stolon/blob/057389f7e484ee1d5c1e1a7020256020e7413c87/cmd/sentinel/cmd/sentinel.go#L372

davissp14 avatar Aug 05 '21 23:08 davissp14

cc:// @rnaveiras @sgotti

davissp14 avatar Aug 11 '21 16:08 davissp14

Is that problem exist for can-be-synchronous-replica flag too? The reason I ask is they both look like a similar flag and were introduced during the same commit.

viggy28 avatar Sep 17 '21 20:09 viggy28