zookeeper-operator icon indicating copy to clipboard operation
zookeeper-operator copied to clipboard

Improvement: Emit warning when using multiple RoleGroups without a myidOffset

Open fhennig opened this issue 3 years ago • 2 comments

Context

The ZK operator uses the ordinal index of pods in the RoleGroup statefulsets to assign a myid to each replica. This approach leads to duplicate IDs when using more than one RoleGroup, als all indices are 0-based. To prevent ID collisions, a custom myidOffset needs to be specified, for which we wrote documentation.

Improvement

The operator doesn't do anything when there are multiple role-groups without an offset. The operator should at least emit a warning

Reference comment: https://github.com/stackabletech/zookeeper-operator/issues/546#issuecomment-1348056967

fhennig avatar Dec 19 '22 12:12 fhennig

Maybe we could even make this an error? I think the operator shouldn't deploy Pods where it knows that ids will conflict. It's easy to track the IDs which are in use.

fhennig avatar Dec 19 '22 12:12 fhennig

Agreed, this can be caught automatically I believe

lfrancke avatar Jan 04 '23 11:01 lfrancke