-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add option to skip kernel parameters on install #21899
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
Add option to skip kernel parameters on install #21899
Conversation
During package install on systemd-based systems, we try to set vm.max_map_count. On some systems (e.g., containers), users do not have the ability to tune these parameters from within the container. This commit provides an option for these users to skip setting such kernel parameters.
94503c2
to
c2b5e7e
Compare
elif [ "$SKIP_SET_KERNEL_PARAMETERS" == "true" ]; then | ||
echo "skipping setting kernel parameters" | ||
else | ||
echo "unrecognized value [$SKIP_SET_KERNEL_PARAMETERS] for SKIP_SET_KERNEL_PARAMETERS; must be unset (defaults to [false]), [false], or [true]" |
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.
The phrase must be unset (defaults to [false]),
took me a while to parse. I'd suggest saying this instead: must be [false] (default) or [true]
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 @clintongormley. I pushed fdaf1c3.
LGTM |
Instead of an option, can't we just try the command and echo a message if it fails? The bootstrap check should warn the user anyway, and the bootstrap check documentation can explain that the command might fail in containerized environment. |
@jasontedor sorry, I read too fast the issue. Then I'm good with the motivation behind this new parameter. |
This commit renames the environment variable used to skip setting kernel parmameters on systemd-based systems during package install to have a prefix that indicates the variable is germane to Elasticsearch.
During package install on systemd-based systems, we try to set vm.max_map_count. On some systems (e.g., containers), users do not have the ability to tune these parameters from within the container. This commit provides an option for these users to skip setting such kernel parameters. Relates #21899
During package install on systemd-based systems, we try to set vm.max_map_count. On some systems (e.g., containers), users do not have the ability to tune these parameters from within the container. This commit provides an option for these users to skip setting such kernel parameters. Relates #21899
During package install on systemd-based systems, we try to set vm.max_map_count. On some systems (e.g., containers), users do not have the ability to tune these parameters from within the container. This commit provides an option for these users to skip setting such kernel parameters. Relates #21899
Thanks @clintongormley and @tlrx. |
This still seems broken in 5.4 when trying to install Elasticsearch in LXC containers. Setting |
@mlanner I don't think |
@jasontedor I did also try to set it systemwide in |
Not having any luck with this either. LXD container with 6.0.0-alpha1. Steps I used:
result:
|
I'm seeing the same results on a LXD/LXC container when using the ansible role - https://github.com/elastic/ansible-elasticsearch I've set ES_SKIP_SET_KERNEL_PARAMETERS to true in my playbook under |
Actually, I did get this to work on an LXD container with... ...and with the ansible role by adding in the environment variable like so....
Putting the quotes around |
Thank you my friend @corradomatt /o/ |
During package install on systemd-based systems, we try to set
vm.max_map_count. On some systems (e.g., containers), users do not have
the ability to tune these parameters from within the container. This
commit provides an option for these users to skip setting such kernel
parameters.
Closes #21877