-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Abort package install if JAVA_HOME is not set and java is not in the path #29665
Comments
Pinging @hub-cap |
Pinging @elastic/es-core-infra |
The package installation relies on java being in the path. If java is not in the path, the tests fail at post-install time. This commit adds a pre-install check to validate that java exists, and if it fails, the package is never installed, and thus keeps a system clean, rather than aborting at post-install and leaving behind a mess. Closes elastic#29665
I ran into some troubles with this when upgrading the ansible-elasticsearch playbook to 6.3. I suspect others are going to run into the same problems too if they are installing elasticsearch and java at the same time. If you run To quote #28928
If elasticsearch also creates this file on startup is there a specific reason why we also want to create it in the post install script? I imagine that there must be a good reason but it sounds like the simplest option would be to just remove this from the post install task and let elasticsearch handle creating it. |
This is because when Elasticsearch is run as a service (via Sys V init or |
The package installation relies on java being in the path. If java is not in the path, the tests fail at post-install time. This commit adds a pre-install check to validate that java exists, and if it fails, the package is never installed, and thus keeps a system clean, rather than aborting at post-install and leaving behind a mess. Closes #29665
The package installation relies on java being in the path. If java is not in the path, the tests fail at post-install time. This commit adds a pre-install check to validate that java exists, and if it fails, the package is never installed, and thus keeps a system clean, rather than aborting at post-install and leaving behind a mess. Closes #29665
The package installation relies on java being in the path. If java is not in the path, the tests fail at post-install time. This commit adds a pre-install check to validate that java exists, and if it fails, the package is never installed, and thus keeps a system clean, rather than aborting at post-install and leaving behind a mess. Closes #29665
Since #28928 we create the keystore in a post-install script. Through our scripts, this requires that
JAVA_HOME
be set or thatjava
is in the path. If this is not the case, the post-install script fails and the installation is broken. It is too late to be failing in post-install. Instead, we should add a check in pre-install for this and fail early.The text was updated successfully, but these errors were encountered: