Skip to content

cifsopts not recovered on daemon restart #188

Open
@fgodfrey

Description

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 :) )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions