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

enketo_redis_* docker containers are sensitive to umask set at git clone time #817

Open
brontolosone opened this issue Dec 5, 2024 · 0 comments · May be fixed by getodk/docs#1898
Open
Labels
dx Developer workflow, automated checks ops Docker, nginx, ops to deploy Central

Comments

@brontolosone
Copy link

brontolosone commented Dec 5, 2024

Problem description

While setting up the docker containers per instructions, one can run into hard to debug problems. Symptom: the enketo_redis_* containers keep restarting which makes it so that the enketo container keeps restarting.

This turned out to be caused by redis not having read permissions for the redis config files bind-mounted into the container. Which turned out to be because of an assumption that these files will be world-readable on the host filesystem.

On Linux (maybe on OSX too? Is there a bind mount mechanism on OSX?), if one has an umask of 027, as one is totally entitled to have set, then after the git clone operation, the files/enketo/redis-enketo-*.conf files in the Central repo will be o=.
At container instantiation time these files are bind-mounted into the container. A bind mount doesn't change UIDs or permissions. Thus unless your host user UID happens to match the in-container redis uid (999), redis will crash on startup as it can't read its config file, leading to a docker restart loop on those containers.

One way to help users avoid this situation could be to simply amend the documentation.

brontolosone added a commit to brontolosone/docs that referenced this issue Dec 5, 2024
@matthew-white matthew-white added the ops Docker, nginx, ops to deploy Central label Dec 5, 2024
@alxndrsn alxndrsn added the dx Developer workflow, automated checks label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer workflow, automated checks ops Docker, nginx, ops to deploy Central
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants