-
Notifications
You must be signed in to change notification settings - Fork 3
Make settings in cassandra-yaml.yaml and jvm-options.yaml configurable. #1
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.
Thanks @viivek46. It's looking good. I did a first pass at reviewing and left some comments.
I also noticed that some settings in both |
Also, please take a look at the style guide for opening PRs. 🙂 |
Yes i refer our existing framework for that, all which were exposed in our existing framework for this templates i have exposed here, but if you think we should expose more, please let me know. |
OK @mpereira , but is there any specific reason why we are removing jira tickets number, as generally we follow this format. |
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.
Good stuff @viivek46! I left a couple comments but thanks for making all these customizable.
Also I vote that we should put the JIRA ticket in title. Makes it easier to find the ticket/motivation for the changes.
Yes, let's make all settings configurable. |
Yeah, the JIRA tag in commit messages is useful for us, but here's a couple of reasons I have in mind:
cc @samvantran |
Co-Authored-By: Sam Tran <[email protected]>
for all settings that are originally commented out in the official configuration file, added a conditional block around it
I have added many more setting configurable, but there are some still left and the reason i haven't added those is because :
|
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.
Minor nits but looks good to me!
operator/templates/jvm-options.yaml
Outdated
-XX:SurvivorRatio=8 | ||
-XX:MaxTenuringThreshold=1 | ||
-XX:CMSInitiatingOccupancyFraction=75 | ||
{{ if .Params.SURVIVORRATIO }} |
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.
If these have default values are were not originally commented, do we still need if checks?
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.
@samvantran Reason i did this because i was not sure how blank value will be treated here, so included in conditional block.
That's a good point. In that case, let's give precedence to the |
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 for the progress so far, and for bearing with our feedback @viivek46.
I was also wondering if for the JVM options ( That way, Cassandra parameters and JVM options would be more easily distinguished. What do you think, @viivek46, @samvantran? |
Yea thats better, i have updated PARAM like that. |
my guess is that different settings were incrementally added over time and we're catching these discrepancies bc we're looking at it as a whole with fresh eyes. I agree with Murilo, when in doubt, go with
💯 |
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.
I've opened a PR with a few fixes and improvements against this PR, please take a look @samvantran and @viivek46 : #2
I think other than the things in the PR above, this PR looks good. The last thing I think we should do is make the authenticator and authorizer configurable. Even though the operator doesn't currently provide any automation for creating users and credentials via cqlsh
, it is still possible for users to do it themselves by following the Cassandra docs, so let's make those configurable.
Thanks for the changes @viivek46. Let's wait for @samvantran to have another look at #2 and then we can get both PRs merged! |
I'll also run some tests that I have in a wip branch to make sure the operator is still working. |
* Add units to setting names, improve names, use correct settings. * Make this look scarier. * Misc improvements. * Better name. * Use fully-scoped actual setting names. * Leave initial_token unconfigurable for now.
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.
This PR looks good to me now. I'll approve it, but before merging, please try merging in #3 into your local branch and running the tests, so that we make sure that everything (install/uninstall with no settings) is still working.
Thanks again for your work @viivek46, and your careful reviews @samvantran.
I just did this and the tests passed. 🎉 |
What changes are proposed in this PR?
Resolves DCOS-59493 DCOS-59494
This PR makes setting in both "cassandra-yaml.yml" & "jvm-options.yaml" template configurable, all setting which are configurable in DCOS cassandra for this 2 files are made configurable in this PR.
How were these changes tested?
Manually tested by installing service and checked 'nodetool status'.