-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag enabling SplitBrain #465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuritka , looks good, just a few suggestions on logging and feature flag naming
f106459
to
cc5681e
Compare
53fe738
to
959fc36
Compare
chart/k8gb/templates/operator.yaml
Outdated
@@ -121,3 +121,5 @@ spec: | |||
value: {{ quote .Values.k8gb.log.level }} | |||
- name: NO_COLOR | |||
value: "true" | |||
- name: SPLIT_BRAIN_PREVENTION | |||
value: {{ quote .Values.k8gb.noSplitBrain }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chart value name is contraversial with env.
I suggest: noSplitBrainDetection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or diableSplitBrainDetection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k0da +1, no sure though why we need to use no-
or disable-
prefix for variables, we can simply set the default value to false
, like already done here: https://github.com/AbsaOSS/k8gb/pull/465/files#diff-b94e4b6c67fca17dce52708f765679ec46a8553531b432d30b8da1b11b1bc89cR84.
I'm also fine with either splitBrainDetection
or splitBrainPrevention
, it's just should be named consistently over the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have just splitBrain
true/false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ytsarev, as I mentioned earlier, split-brain is the name of the issue happening in the distributed system. So if we tell that we want to enable or disable the split-brain - this looks exactly confusing from user point of view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more correct to tell that we want to enable or disable the split-brain detection or prevention feature. We don't want to enable the problem, we want to enable the solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
splitBrainCheck true/false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@somaritane, @k0da
SPLIT_BRAIN_CHECK
- default value (empty or not set) false
- invalid value - false
- true, t, 1,T ,True, ... - enables split-brain otherwise it's disabled
If we do it this way, then enabling split-brain will require to set SPLIT_BRAIN_CHECK
to true on each k8gb you want to have split-brain, otherwise it will be disabled by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuritka looks good 👍 , let's also update the PR title and body for consistency with amendments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making splitbrain 'enabling' semantics instead of prevention. It will be much more obvious for end user
959fc36
to
92045ae
Compare
yes I see - with default value true, but what if value is invalid, also true? disabling semantics is much easier in this. |
Ok, https://github.com/AbsaOSS/k8gb/pull/465#discussion_r626320501 proposal looks fine |
92045ae
to
36e3c2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
**SplitBrainCheck flag**; If false (default) splitBrain is disabled, no metter what EdgeDNSType you use. To enable SplitBrain, set `SPLIT_BRAIN_CHECK` to true - I added new field to depresolver Config (SplitBrainCheck) and introduced new env var `SPLIT_BRAIN_CHECK`. - I updated infoblox provider to skip TXT interractions when !NoSplitBrain - Me & k0da made e2e tests against test clusters - Fix heartbeat issue Signed-off-by: kuritka <[email protected]>
d59fdd0
to
19208ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuritka LGTM 👍
SplitBrainCheck flag; If false (default) splitBrain is disabled, no metter what EdgeDNSType you use.
To enable SplitBrain, set
SPLIT_BRAIN_CHECK
to trueSPLIT_BRAIN_CHECK
.Signed-off-by: kuritka [email protected]