Skip to content

Remove leniency check for /etc/(default|sysconfig)/elasticsearch #26062

@jasontedor

Description

@jasontedor

In #26057 we enabled set -e on the scripts. This means we exit if there's an error. For the Debian and RPM integration tests, we extract the contents of the package but do not install Elasticsearch. In the elasticsearch-env scripts for the Debian and RPM packages, we try to source /etc/(default|sysconfig)/elasticsearch. If we extract the contents but do not install the package, then there is no guarantee that these files exist and thus sourcing would fail. Since we enabled set -e, this means the scripts will fail, and the Debian and RPM integration tests will fail. To workaround this, we added a check for the existence of these files thus adding leniency to elasticsearch-env.

This issue proposes reverting adding this leniency. Instead, we should not be checking the Debian and RPM packages via these means, we should rely on real integration tests where we actually install from the packages and try to start Elasticsearch. We already have this: the packaging tests.

Therefore, the end game to removing the leniency check is simply removing the integration tests from the Debian and RPM package distributions, i.e., distribution/deb/build.gradle and distribution/rpm/build.gradle.

Metadata

Metadata

Labels

:Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scriptsTeam:DeliveryMeta label for Delivery team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions