-
Notifications
You must be signed in to change notification settings - Fork 59
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
Setting sysctl parameters on nodes #208
Comments
Agree with it being off by default to avoid surprises. Also agree that perhaps The original name is derived from that fact that to call |
Actually, I'd like to open this for discussion with @benbromhead @smiklosovic Cassandra really likes to create a large number of memory mappings, and doesn't handle things gracefully when this fails. I can see a few options:
|
I'm not a C* expert but FWIW, I'm for option 2 (default to
|
I think the defaults should prioritize a stable, easy initial experience. So happy to leave it set to false and C* configured however it needs to be to make it work better. As long as we have comments in the example yaml files and helm packages saying it should be turned on in production, maybe a WARN in the operator logs and a production documentation page. |
Fixes instaclustr#213 Fixes instaclustr#208 * Fixed some comments from PR review * Added Env to CRD to allow specifying environment for containers (exists in java version) * Added userConfigMap handling (instaclustr#213) * Restored PrivelegedSupported handling (instaclustr#208) * Backup secret volume allows providing GOOGLE_APPLICATION_CREDENTIALS in a secret * Cloud providers creds can be set using Env field in CRD Signed-off-by: Alex Lourie <[email protected]>
@zegelin @benbromhead so, if it's disabled (by default), what corresponding params should/shouldn't be in cassandra yaml? I can do it together within #218 |
…andra and sidecar (#218) * Initial work for clouds secrets and user-defined configmap Signed-off-by: Alex Lourie <[email protected]> * PR comments fixes Fixes #213 Fixes #208 * Fixed some comments from PR review * Added Env to CRD to allow specifying environment for containers (exists in java version) * Added userConfigMap handling (#213) * Restored PrivelegedSupported handling (#208) * Backup secret volume allows providing GOOGLE_APPLICATION_CREDENTIALS in a secret * Cloud providers creds can be set using Env field in CRD Signed-off-by: Alex Lourie <[email protected]> * Support TLS certificates for internal communication Signed-off-by: Alex Lourie <[email protected]> * PR comments, docs updates Signed-off-by: Alex Lourie <[email protected]> * Cleanups Signed-off-by: Alex Lourie <[email protected]> * Path naming update Signed-off-by: Alex Lourie <[email protected]> * Cleanups * go fmt Signed-off-by: Alex Lourie <[email protected]>
Is this finished? |
No, we are still creating C* pods with these capabilities: cassandra-operator/pkg/controller/cassandradatacenter/statefulset.go Lines 136 to 143 in c7a7e0c
I can create a PR to disable these but I am not sure which C* features to tune along with this change. |
Based on the commend of @zegelin
and @benbromhead
Hence, we should set it to false and configure To my knowledge there is only one such flag: If we do set it up to true via some CRD field / flag, we should set that to "mmap" in (1) https://www.oreilly.com/library/view/cassandra-high-performance/9781849515122/ch04s11.html |
@smiklosovic great, so I guess I can make the required changes in the operator, tighten up the PSPs, update the relevant C* config and open a PR. Then you folks can verify performance looks OK. How does that sound? |
Sounds like a plan! |
@smiklosovic looks like we aren't setting |
no we apparently dont but we should (based on whether we use these capabilities or not), that is my understanding of that I believe that |
The default is ‘auto’. It’s either in the stock yaml or in the code — can’t
remember which.
As Stefan mentioned, if mmap sysctl tuning is enabled we should generate a
yaml override fragment that explicitly sets disk access mode to ‘mmap’.
…On Tue, Aug 27, 2019 at 9:37 AM, Štefan Miklošovič ***@***.***> wrote:
no we apparently dont but we should (based on whether we use these
capabilities or not), that is my understanding of that
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#208?email_source=notifications&email_token=AETHC6VKVBOOGL5TW5MFHB3QGVJ4HA5CNFSM4IHGEFXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5ILMWA#issuecomment-525383256>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AETHC6QSKYIQMC2NYZM5XULQGVJ4HANCNFSM4IHGEFXA>
.
|
Fixed in #269. |
This issue is partially discussed in #116.
General
At the moment the Go version of the operator sets
vm.max_map_count
on worker nodes by running a privileged init container:cassandra-operator/pkg/controller/cassandradatacenter/statefulset.go
Lines 162 to 175 in cfb76a7
Doing this by default can be unexpected for a user as this is a host-level setting which could potentially affect other pods on the relevant nodes. In addition, some environments may not allow running privileged containers, which can make deployments break.
The examples seem to hint this is an optional feature, however this field isn't included in the
CassandraDataCenter
API, which means it is ignored by the operator.Suggested Changes
Assuming this setting is indeed necessary, I would consider the following:
privilegedSupported
to something which better describes what it does. Example:optimizeSysctl
.Implementing the suggestions above would make less assumptions on the user's environment and avoid taking decisions on behalf of the user which may exceed the responsibility of this operator.
The text was updated successfully, but these errors were encountered: