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

Permission denied in minikube cockroachdb cluster #897

Open
gonzojive opened this issue May 14, 2022 · 2 comments
Open

Permission denied in minikube cockroachdb cluster #897

gonzojive opened this issue May 14, 2022 · 2 comments

Comments

@gonzojive
Copy link

gonzojive commented May 14, 2022

I followed the official instructions for a local kubernetes cluster. It worked.

I then tried to use a persistent volume for the database data. The cockroachdb pods fail to start with the following error message:

++ expr 8192 / 4
++ expr 8192 / 4
+ exec /cockroach/cockroach.sh start --join=blahcockroachdb-0.blahcockroachdb.default:26258,blahcockroachdb-1.blahcockroachdb.default:26258,blahcockroachdb-2.blahcockroachdb.default:26258 --advertise-host=blahcockroachdb-1.blahcockroachdb.default --certs-dir=/cockroach/cockroach-certs/ --http-port=8080 --sql-addr=:26257 --listen-addr=:26258 '--log={sinks: {stderr: {channels: [OPS, HEALTH], redact: true}}}' --cache 2048MiB --max-sql-memory 2048MiB
unable to GC log files: open /cockroach/cockroach-data/logs: permission denied

I believe kubernetes/minikube#1990 is causing the permission denied error because the mounted persistent volume is not writable by user 1000581000 despite fsGroup being set to 1000581000 for the volume.

A workaround might be to modify the operator to chown or chgrp the /cockroach/cockroach-data directory appropriately.

certCpCmd = ">- cp -p /cockroach/cockroach-certs-prestage/..data/* /cockroach/cockroach-certs/ && chmod 700 /cockroach/cockroach-certs/*.key && chown 1000581000:1000581000 /cockroach/cockroach-certs/*.key"

@noguchitoshi
Copy link
Contributor

Hi, are you supplying a different persistent volume than the one that is automatically used?

@gonzojive
Copy link
Author

gonzojive commented May 24, 2022 via email

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

No branches or pull requests

2 participants