Skip to content
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

Clarify gid used by docker image process and bind-mount method #49529

Merged
merged 13 commits into from
Nov 27, 2019

Conversation

dliappis
Copy link
Contributor

Elasticsearch runs as uid:gid 1000:0 inside the Docker image:
Clarify docs to reflect this and add required packaging test.
Finally, remove unnecessary trailing whitespace characters from the
Docker docs page.

Closes #47929

@dliappis dliappis added >docs General docs changes :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts v8.0.0 labels Nov 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Packaging)

@dliappis
Copy link
Contributor Author

Note: not assigning reviewers yet, until packaging CI turns green.

@dliappis
Copy link
Contributor Author

Packaging-matrix job is now green, assigned reviewers.

// Restart the container
final Map<Path, Path> volumes = Map.of(tempEsDataDir.toAbsolutePath(), Path.of("/usr/share/elasticsearch/data"));

runContainer(distribution(), volumes, Map.of("ES_JAVA_OPTS", "-Xms512m -Xmx512m"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the extra env vars here? I don't see any assertions that the values are in effect. You can pass null otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only because I wanted to keep the memory usage to a minimum for this type of test. Default is 1GB which I thought is unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the Docker tests do anything exciting right now, or spin up multiple nodes, so we could make this the default. I think the tests should all work the same way though, unless they need to change a setting for the sake of the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted for not setting the heap in this test: 289f776
We can reduce the footprint for all tests, by default, in a future PR.

and use of installation.data instead of hardcoded values.
* Switch to int in signature
* Address PR comment about redundant .toString()
@dliappis dliappis requested a review from pugnascotia November 25, 2019 13:11
@dliappis
Copy link
Contributor Author

@pugnascotia Thanks for the comments! I think I addressed them with the exception of #49529 (comment) for the reason suggested there. Could you take another pass when there's time?

@dliappis dliappis requested a review from pugnascotia November 25, 2019 13:42
Copy link
Contributor

@debadair debadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dliappis dliappis merged commit 1c9efba into elastic:master Nov 27, 2019
dliappis added a commit to dliappis/elasticsearch that referenced this pull request Nov 27, 2019
Fix reference about the uid:gid that Elasticsearch runs as inside
the Docker container and add a packaging test to ensure that bind
mounting a data dir with a random uid and gid:0 works as
expected.

Relates elastic#49529
Closes elastic#47929
dliappis added a commit that referenced this pull request Nov 27, 2019
Fix reference about the uid:gid that Elasticsearch runs as inside
the Docker container and add a packaging test to ensure that bind
mounting a data dir with a random uid and gid:0 works as
expected.

Backport of #49529
Closes #47929
@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
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >docs General docs changes Team:Delivery Meta label for Delivery team v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerised server cannot access bindmounts with the documented group ID
6 participants