-
-
Notifications
You must be signed in to change notification settings - Fork 473
Conflicts because of sysctl #745
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
Comments
@soylent the logic for handling the kernel parameter within the module is due to the fact that Elasticsearch 5.x will refuse to start without There could be a few options here:
I'd be inclined to go with 1 or 2 if people feel strongly about it so the module can leave those settings alone if users want, but purging it entirely shifts a lot of the work onto users when the module is here in the first place to handle these sort of configuration changes for users. |
Thank you for your reply. The documentation says that sysctl { 'vm.max_map_count':
value => '262144',
} is necessary.
This seems like an issue with init scripts or systemd configs |
Ah, I see what you're saying. While you're right that in some of the init scripts that Elasticsearch ships with, this is set given the value passed in through We could conceivably remove the sysctl resource in the puppet configs and move them into init scripts. However, this also means:
|
@tylerjl
|
@cdenneen that would just mean the elasticsearch module can't find the sysctl module, double check it's installed and available in puppet. |
This should not be necessary: elastic/elasticsearch@1fde263
True, but we don't want to add even more complexity by configuring the kernel in this module. So I think, it is better to keep the kernel params in the init/systemd files. |
Ah, okay. In that case I think it's a good idea to just follow upstream (Elasticsearch) and copy the init script behavior. That should cover the use cases I enumerated pretty well. I'll submit a PR for this when I get time, and the CI acceptance tests should cover the relevant distros to ensure the change doesn't break them. Thanks! |
We're running a OpenVZ/Virtuozzo where it isn't possible to set most of the sysctl parameters from within the VE. Therefor we strongly support an option to disable the configuration of sysctl parameters with in this module/init scripts. If I can help with the implementation please let me know. |
Consider this another vote for modification of sysctl to be far outside of scope of what a module should do. That's something that should be included as part of a profile one might build around this module. Documentation of "suggested considerations" regarding the application would be more in line with the idea of module containment. Also, this module breaks trying to use thias/sysctl on the latest version of PE. There's been issues brought up regarding namespacing and scoping problems with different puppet versions on that modules issues. This has left me with two options:
Either way, I'm forking something and bound to back myself into a corner. |
I've PRd a fix in #762 that's baking in CI, it looks good to me, please do provide feedback if anyone has concerns about the fix. 🐟 |
I've merged #762, so this change should go out in the next release. The acceptance tests have confirmed that setting sysctl happens either in the init scripts or package postinst scripts (as upstream manages it). Thanks for the feedback! |
Bug description
I think that this module should not change kernel parameters. It seems out of scope of the module and too error-prone.
If I want to use
sysctl
using a third-party module (other thanthias-sysctl
), I get a duplicate declaration error forFile['/etc/sysctl.d/']
.If I use
thias-sysctl
module and try to changevm.max_map_count
, I get the following error:Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Sysctl[vm.max_map_count] is already declared; cannot redeclare at /etc/puppetlabs/code/vendor/modules/elasticsearch/manifests/config.pp:131 at /etc/puppetlabs/code/vendor/modules/elasticsearch/manifests/config.pp:131:7
The text was updated successfully, but these errors were encountered: