Skip to content

Elasticsearch 7.6.0 cannot be used as service in GitLab pipeline anymore #52503

@dawi

Description

@dawi

Starting with version 7.6.0 Elasticsearch cannot be started as service in a Gitlab pipeline anymore.

Gitlab sets a CI_SERVER_TLS_CA_FILE variable which contains a path to a file.
It seems that this variable is now expanded to contain the content of the file.

Service container logs:
2020-02-19T06:52:56.510497268Z ERROR: File -----BEGIN CERTIFICATE-----
2020-02-19T06:52:56.510521348Z ....
2020-02-19T06:52:56.510608065Z -----END CERTIFICATE-----
2020-02-19T06:52:56.510610718Z  from CI_SERVER_TLS_CA_FILE does not exist

I am not completely sure if this is an Elasticsearch issue or not, but I figured out that Elasticsearch does some environment variable processing and it could very well be the cause of this issue:

Also extract the support for _FILE env vars into a separate script, so
that it can be called from more than once place (the behaviour is
idempotent).

https://github.com/elastic/elasticsearch/blob/v7.6.0/distribution/src/bin/elasticsearch-env-from-file

Metadata

Metadata

Assignees

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