Skip to content

Fix passing positional args to ES in Docker (#88502)#88552

Merged
pugnascotia merged 1 commit intoelastic:8.3from
pugnascotia:fix-docker-positional-params-8.3
Jul 18, 2022
Merged

Fix passing positional args to ES in Docker (#88502)#88552
pugnascotia merged 1 commit intoelastic:8.3from
pugnascotia:fix-docker-positional-params-8.3

Conversation

@pugnascotia
Copy link
Copy Markdown
Contributor

Backport of #88502.

As part of #50277, we removed the TAKE_FILE_OWNERSHIP option from the
Docker entrypoint script and the associated chroot calls, and instead
just defaulted to running the image as elasticsearch instead of
root.

However, we didn't check that it was still possible to pass CLI options
to Elasticsearch via CLI arguments, and broke this by mistake. This is
probably an uncommon pattern, versus environment variables or a config
file. Nevertheless, it is supposed to be possible and is mentioned in
the documentation.

Fix the problem by suppling the missing positional params when calling
Elasticsearch, and add a test case so that we don't break it again.

As part of elastic#50277, we removed the `TAKE_FILE_OWNERSHIP` option from the
Docker entrypoint script and the associated chroot calls, and instead
just defaulted to running the image as `elasticsearch` instead of
`root`.

However, we didn't check that it was still possible to pass CLI options
to Elasticsearch via CLI arguments, and broke this by mistake. This is
probably an uncommon pattern, versus environment variables or a config
file.  Nevertheless, it is supposed to be possible and is mentioned in
the documentation.

Fix the problem by suppling the missing positional params when calling
Elasticsearch, and add a test case so that we don't break it again.
@pugnascotia pugnascotia added >bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts backport v8.3.3 labels Jul 14, 2022
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Jul 14, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@pugnascotia
Copy link
Copy Markdown
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-tests-unix

@pugnascotia pugnascotia merged commit 65f8af0 into elastic:8.3 Jul 18, 2022
@pugnascotia pugnascotia deleted the fix-docker-positional-params-8.3 branch July 18, 2022 08:24
pugnascotia added a commit that referenced this pull request Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team v8.3.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants