You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to create a CIFS volume on a Linux host and I want the user ID mapped to a specific UID number (in this example, 999). This works fine until I restart the docker-volume-netshare daemon. At that point, the options are lost.
The following test shows the issue:
Create/test:
docker volume create -d cifs --opt 'cifsopts=uid=999' --name server.example.com/test-vol
docker run -it --rm -v server.example.com/test-vol:/test busybox:latest sh
We see this from the docker-volume-netshare verbose log, which is correct:
mount -t cifs -o uid=999,username='my-user',password='****',rw //server.example.com/test-vol /var/lib/docker-volumes/netshare/cifs/server.example.com/test-vol
Now, exit the container, restart docker-volume-netshare, and rerun the "docker run" command. Now from the docker-volume-netshare verbose log, we see this, which omits the "uid=999" option:
mount -t cifs -o username='my-user',password='****',rw //server.example.com/test-vol /var/lib/docker-volumes/netshare/cifs/server.example.com/test-vol
I am not sure if the Docker daemon stores the options or if we would need to introduce a cache in docker-volume-netshare. I am not very proficient with Go so I'm not sure I'll be able to put together a PR to do the latter, but I'll try (or if someone else gets there first, I won't complain :) )
The text was updated successfully, but these errors were encountered:
fgodfrey
changed the title
cifsopts not recovery on daemon restart
cifsopts not recovered on daemon restart
Feb 9, 2020
The docker volume inspect command returns the options. So, I believe the fix is to "inspect" each volume as we discover it in the recovery function and add the options there. I am working on a PR that will do this.
fgodfrey
added a commit
to fgodfrey/docker-volume-netshare
that referenced
this issue
Feb 10, 2020
I am attempting to create a CIFS volume on a Linux host and I want the user ID mapped to a specific UID number (in this example, 999). This works fine until I restart the docker-volume-netshare daemon. At that point, the options are lost.
The following test shows the issue:
Create/test:
docker volume create -d cifs --opt 'cifsopts=uid=999' --name server.example.com/test-vol docker run -it --rm -v server.example.com/test-vol:/test busybox:latest sh
We see this from the docker-volume-netshare verbose log, which is correct:
Now, exit the container, restart docker-volume-netshare, and rerun the "docker run" command. Now from the docker-volume-netshare verbose log, we see this, which omits the "uid=999" option:
I am not sure if the Docker daemon stores the options or if we would need to introduce a cache in docker-volume-netshare. I am not very proficient with Go so I'm not sure I'll be able to put together a PR to do the latter, but I'll try (or if someone else gets there first, I won't complain :) )
The text was updated successfully, but these errors were encountered: