-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Not able to start services with stack scoped volumes in rancher-nfs #7334
Comments
This issue is seen with rancher-server version - v1.3.0 |
I've the exact same issue when creating a service using a "rancher-nfs" volume into a stack directly from the UI. I can see the volume in the storage UI so it has been created (environment scoped) but the service won't start because of the same "chown" issue. |
I was having the same issue while trying to use a rancher-nfs volume in a elasticsearch container. More info here:
So your exports should look like this: |
I have got the same problem with "chown" permission on Rancher v.1.3.3 and rancher-nfs from rancher/storage-nfs:v0.6.0 image. The setup no_root_squash "solve" the issue for now. |
@sangeethah Can you re-test this one with passing the option |
I haven't been able to get around the problem. I'm using FreeNAS which is BSD based and they don't have a no_root_squash. I've tried maproot as root and mapall as root, but both still run into the chown issue. |
I believe setting up NFSv4 in an existing environment or without endless financial resources is impossible. Most people will end up disabling some core features with I can't believe how many hours I wasted to setting up NFSv4 in our company just because of |
if you can't specify the no_root_squash, don't mount the volume to a existing path inside the container. For all docker named volume, it will copy all the files from container mountpoint to nfs volume, which will raise weird permission error. The solution might be passing nocopy. Right now the workaround is just using a non-existing path inside the container as the mountpoint. |
Tested with rancher/storage-nfs:v0.8.0 using rancher-server version - v1.6.0-rc1 Able to create volume and attach them to containers successfully when following setting are done for mount points on the nfs server:
|
I'm experiencing this issue. Is |
Related: #9363 |
I have the same problem, the server is an NFSv3 NAS and does not have a "no_root_squash" option. Are there any other workarounds to make rancher-nfs function? |
Also have this problem. "no_root_squash" not available on FreeNAS/FreeBSD. |
Also have this problem. "no_root_squash" not available on FreeNAS/FreeBSD. and also me.... FreeBSD NFS box |
For those with FreeNAS problems, setting a few config options has it working for me:
This has allowed me to mount nfs volumes from FreeNAS using rancher-nfs |
Thanks a lot, I'll try that @joshuata |
I'm realizing that nocopy was only useful because there were permissions issues. The reason it temporarily resolved the problem for me was that it was attempting to write to the nfs share which didn't have write access. |
yeah, im having the same issue on freenas also, can't pass in no_root_squash |
@joshuata where exactly do you put these options? In the FreeNAS NFS share or in rancher? I can't find anywhere to put this. |
In rancher. There is an option when setting up an nfs volume to set flags. Note that this was a year ago with rancher v1, so things may have changed since then. I can't make any promises about more recent versions since I now just use docker-compose because its much lighter weight |
Rancher Versions: Build from master
Environment - cattle with rancher-nfs - rancher/storage-nfs:v0.6.0
Create a stack using the following yml:
Sangeethas-MacBook-Pro:rancher-compose-v0.12.1 sangeethahariharan1$ ./rancher-compose -p new1 -f test1.yml up
INFO[0000] Creating volume template foo3
INFO[0000] [0/1] [nginx3]: Creating
INFO[0000] Creating service nginx3
INFO[0000] [0/1] [nginx3]: Created
INFO[0000] Existing volume template found for foo3
INFO[0000] [0/1] [nginx3]: Starting
INFO[0005] [1/1] [nginx3]: Started
ERRO[0006] Failed to get logs for new1-nginx3-1: Failed to find action: logs
Stack scoped Volume gets created -
new1_foo3_82c63
but it in "Dactched" state.Containers fail to start with the following exception:
Activating (Expected state running but got error: Error response from daemon: chown /var/lib/rancher/volumes/rancher-nfs/new1_foo_3e06f: operation not permitted
The text was updated successfully, but these errors were encountered: