Skip to content

Avoid failing install if system-sysctl is masked #25657

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

Merged
merged 1 commit into from
Jul 11, 2017

Conversation

jasontedor
Copy link
Member

On Debian-based systems the install scripts are run with set -e meaning that if there is an error in executing one of these scripts then the script fails. If systemd-sysctl is masked then trying to restart the systemd-sysctl service to pick up the changes to vm.max_map_count will fail leading to the post-install script failing. Instead, we should account for the possbility of failure here by not letting the command to restart this service exit with non-zero status code. This commit does this, and adds a test for this situation.

Relates #24234

On Debian-based systems the install scripts are run with set -e meaning
that if there is an error in executing one of these scripts then the
script fails. If systemd-sysctl is masked then trying to restart the
systemd-sysctl service to pick up the changes to vm.max_map_count will
fail leading to the post-install script failing. Instead, we should
account for the possbility of failure here by not letting the command to
restart this service exit with non-zero status code. This commit does
this, and adds a test for this situation.
@jasontedor jasontedor added :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >bug review v5.5.1 v5.6.0 v6.0.0 labels Jul 11, 2017
@rjernst
Copy link
Member

rjernst commented Jul 11, 2017

LGTM

@jasontedor jasontedor merged commit 3a82782 into elastic:master Jul 11, 2017
jasontedor added a commit that referenced this pull request Jul 11, 2017
On Debian-based systems the install scripts are run with set -e meaning
that if there is an error in executing one of these scripts then the
script fails. If systemd-sysctl is masked then trying to restart the
systemd-sysctl service to pick up the changes to vm.max_map_count will
fail leading to the post-install script failing. Instead, we should
account for the possbility of failure here by not letting the command to
restart this service exit with non-zero status code. This commit does
this, and adds a test for this situation.

Relates #25657
jasontedor added a commit that referenced this pull request Jul 11, 2017
On Debian-based systems the install scripts are run with set -e meaning
that if there is an error in executing one of these scripts then the
script fails. If systemd-sysctl is masked then trying to restart the
systemd-sysctl service to pick up the changes to vm.max_map_count will
fail leading to the post-install script failing. Instead, we should
account for the possbility of failure here by not letting the command to
restart this service exit with non-zero status code. This commit does
this, and adds a test for this situation.

Relates #25657
@jasontedor jasontedor deleted the systemd-sysctl branch July 11, 2017 21:39
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team v5.5.1 v5.6.0 v6.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants