-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Defaulting min.insync.replicas to 1 when it's not specified by the user
#11883
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
Defaulting min.insync.replicas to 1 when it's not specified by the user
#11883
Conversation
Signed-off-by: Paolo Patierno <[email protected]>
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.
Why not add it as default to KafkaConfiguration? We have support for it and use it in other configuration classes such as KafkaConnectConfiguration.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11883 +/- ##
============================================
- Coverage 67.51% 67.50% -0.02%
+ Complexity 7083 7077 -6
============================================
Files 574 574
Lines 28143 28139 -4
Branches 3189 3188 -1
============================================
- Hits 19002 18994 -8
Misses 7824 7824
- Partials 1317 1321 +4
🚀 New features to boost your workflow:
|
Yes but by adding In that case I can add the check but changing slightly the warning message from: "min.insync.replicas option is not configured. It defaults to 1 which does not guarantee reliability and availability. You should configure this option in .spec.kafka.config." to: "min.insync.replicas option is set to 1 explicitly or it is not configured which defaults to 1 as well. It does not guarantee reliability and availability. You should configure this option in .spec.kafka.config. with a value higher than 1" |
I guess it would be pretty simple to change the |
Removed handling of min.insync.replicas deletion based on ELR Signed-off-by: Paolo Patierno <[email protected]>
|
@scholzj done. I also marked it as ready for review because I removed the previous solution we merged. |
katheris
left a comment
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.
Thanks @ppatierno for addressing this so quickly.
I've reviewed the previous PRs and the various issues and I'm happy I now understand the problem and how this changes addresses it.
I prefer this over the original fix since it means it's easier for users to understand what the value will be when they remove min.insync.replicas from the Kafka CR.
tinaselenge
left a comment
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.
Thank you so much @ppatierno for redoing the fix. It has been a tricky one, so unfortunately we went back and forth on the solution despite the discussions and agreement on the issues. I think this solution looks more straight forward and easier to understand the reason behind it. And we get to avoid the extra checks on feature level etc. So all good from me!
|
/azp run regression |
|
Azure Pipelines successfully started running 1 pipeline(s). |
scholzj
left a comment
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.
Mostly LGTM. I just left some nits. The regression tests failed with some Docker issue, so I restarted them. Hopefully they pass now.
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaConfiguration.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaConfiguration.java
Outdated
Show resolved
Hide resolved
cluster-operator/src/main/java/io/strimzi/operator/cluster/model/KafkaSpecChecker.java
Outdated
Show resolved
Hide resolved
I guess I was not the first one to try that. Let's see if GHA works better 🤔 |
|
/gha run pipeline=regression |
|
⏳ System test verification started: link |
|
🎉 System test verification passed: link |
showuon
left a comment
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.
One doc related comment. The solution LGTM! Thanks for improving it!
Signed-off-by: Paolo Patierno <[email protected]>
PaulRMellor
left a comment
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.
Thanks Paolo.
Considering the change of approach to the fix, the warning in the docs is perfect
|
/azp run regression |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This PR fixes #11880
What it does is just defaulting the
min.insync.replicasto1when the user doesn't specify it within the.spec.kafka.configin theKafkacustom resource and it happens despite what's the value of ELR (enabled or not).This way, it happens:
min.insync.replicas: 1into the ConfigMap so that when it comes to the KafkaRoller it's still seen as an update (not a removal) and the dynamic configuration change is applied (still no brokers rolling).