-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot write data to local PVC #3704
Comments
Experiencing the same issue with this latest version. The issue appears to be a result of the following change:
As a result, Further, the Unless I am missing something, it seems this latest feature introduces a hard requirement of running a root container (either as an |
Yeah, it looks like the 0700 permissions are applied to every volume directory, even though the original plan was to apply these permissions to the parent storage folder (
rancher/local-path-provisioner#182
I wonder why the PR that got merged didn't implement it this way. |
@dereknola can you take a look at this? It appears that with the permissions change, LocalStorage no longer supports containers that don't run as root. |
Yeah, I'll take a look. |
I can confirm this behavior. This problem cripples all deployments with PVCs and non-root-containers, which make up about 60% of my complete workload. Is the only workaround ATM to use an init-container? |
@georglauterbach You could also downgrade to K3s 1.21.2 until this is fixed. |
@ChristianCiach how do I do that in the best way possible ?:) Btw. thanks for the fast reply :D PS: I figured it out. Thanks for the hint nevertheless :) |
Validated on master branch commit
|
I take it that this will be available on v1.21.4 and not on v1.21.3? How would we get this fix before .4 release? |
I am a bit surprised about that, too. I think this bug is bad enough to justify an early |
I personally don't care too much if it'd be in a |
@samip5 Yes, upstream meaning Kubernetes. |
So how does it help us with broken provisioner on k3s? |
The k3s release schedule is generally in lock-step with upstream Kubernetes. So k3s v1.21.4 release comes after Kubernetes has released v1.21.4. K3s releases integrate the changes made to upstream. |
You can revert to the previous release, or wait until v1.21.4 is released within the next day or two. |
K3s v1.21.4 is now out with the fix for this issue. |
Is there a matching k3d release as k3d seems also to be effected |
K3d can run any k3s release, just use the --image flag to specify the image and tag you want. |
@brandond fantastic, I will use that workaround thanks. Usually just like to use the latest version k3d recommends as default. This is what ultimately broke our CI |
See: k3s-io/k3s#3704 Figuring out what to actually put on the --image option was far harder than it seems it should have been. :-\ Signed-off-by: John Mulligan <[email protected]>
See: k3s-io/k3s#3704 Figuring out what to actually put on the --image option was far harder than it seems it should have been. :-\ Signed-off-by: John Mulligan <[email protected]>
Hi, I have now what it seems to be the same issue with My cluster is a Here the error I retrieve:
More details in this other issue: loft-sh/vcluster#264 (comment) Any idea if it will be fixed in the next releases? Thank you |
@antonioberben that appears to be a completely different problem, related to cgroups. Can you open a new issue? |
Hi, I'm running into the same problem as noted in this issue's OP. I could fix the permissions issue by running:
The permissions were previously set to 755. I'm running v1.25.12+k3s1. Is this a regression? If not, what could cause the storage to be set with 755, instead of 777? Scott |
The |
@brandond - Yea, I meant the folders under This is what is in the
Looks correct to me? What would happen, if the user doing the k3s install isn't root? Could that also possibly cause this issue? I didn't want to mess with testing it, as now everything is working, thus my "laziness". 🤷 Scott |
If you're not root when running the install script, the script will use sudo to become root. You can check out the docs section on rootless operation if you are curious about running it as an unprivileged user - but what you're asking about wouldn't cause this. |
Old releases of K3s used different permissions. As I mentioned, the permissions are set when the volumes are created, so its likely they were created on a different version of K3s? |
Yes, I believe originally they were created with v1.23x. Scott |
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
Single node
Describe the bug:
Postgres does not come up due to
mkdir: cannot create directory ‘/var/lib/postgresql/data’: Permission denied
Steps To Reproduce:
Expected behavior:
postgres comes up
Actual behavior:
postgres crashes
Additional context / logs:
mkdir: cannot create directory ‘/var/lib/postgresql/data’: Permission denied
The text was updated successfully, but these errors were encountered: