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

fix: fix ulimits error for elasticsearch in Docker rootless mode #921

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

OmarIthawi
Copy link
Contributor

@OmarIthawi OmarIthawi commented Oct 12, 2023

Description

Unset ulimits.memlock for elasticsearch for Docker rootless devstacks.

Related issue:

Error

When running tutor dev launch in rootless docker, everything works except for elasticsearch.

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 8: operation not permitted: unknown

TODO

  • Test locally
  • Rebase and open against master

@OmarIthawi OmarIthawi force-pushed the rootless_docker branch 6 times, most recently from 95b71e3 to 0cf636b Compare October 12, 2023 09:07
@OmarIthawi OmarIthawi changed the base branch from nightly to master October 12, 2023 09:07
@OmarIthawi OmarIthawi marked this pull request as ready for review October 12, 2023 12:00
@OmarIthawi
Copy link
Contributor Author

@regisb this now ready for review. I've tested it locally and it works like a charm :)

@regisb regisb self-requested a review October 17, 2023 06:52
@regisb regisb self-assigned this Nov 14, 2023
Copy link
Contributor

@regisb regisb left a comment

Choose a reason for hiding this comment

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

Sorry for the long delay!

tutor/commands/dev.py Outdated Show resolved Hide resolved
tutor/templates/local/docker-compose.yml Outdated Show resolved Hide resolved
@regisb regisb assigned OmarIthawi and unassigned regisb Nov 14, 2023
@OmarIthawi OmarIthawi force-pushed the rootless_docker branch 4 times, most recently from de09c83 to b942a61 Compare November 16, 2023 05:19
disable `ulimits` in rootless docker mode by setting them to zero
@OmarIthawi OmarIthawi changed the title fix: disable ulimits in rootless docker mode fix: fix ulimits error for elasticsearch in Docker rootless mode Nov 16, 2023
@OmarIthawi OmarIthawi requested a review from regisb November 16, 2023 05:22
@OmarIthawi
Copy link
Contributor Author

OmarIthawi commented Nov 16, 2023

@regisb I've refactored the solution to be dev-only without needing a new docker-compose file.

Please let me know if that works for Tutor.

I've found that setting ulimits.memlock to zero is effectively unsetting the config:

Copy link
Contributor

@regisb regisb left a comment

Choose a reason for hiding this comment

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

Awesome!

@regisb regisb merged commit 65ba0d2 into overhangio:master Nov 23, 2023
1 check passed
@OmarIthawi
Copy link
Contributor Author

Thanks @regisb!! This is my first Tutor contribution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Docker rootless: Error when setting ulimits on elasticsearch
2 participants