Sentinel does not consider `can-be-master` flag on initialize
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
cc:// @rnaveiras @sgotti
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.