rancher / convoy

A Docker volume plugin, managing persistent container volumes.
Apache License 2.0
1.31k stars 135 forks source link

Container mountpoint lost after reboot #118

Closed deviantony closed 8 years ago

deviantony commented 8 years ago

Hi guys !

I'm currently playing with convoy and managed to use it inside a Swarm cluster using a NFS server to share my volumes between the hosts.

The only thing is that when I restart a host, convoy seems to lost the mountpoint data for the volumes.

Before reboot of the host:

$ sudo convoy list
{
    "b6139d73-666c-4c52-aa6c-7ef912c6a051": {
        "UUID": "b6139d73-666c-4c52-aa6c-7ef912c6a051",
        "Name": "shared-vol",
        "Driver": "vfs",
        "MountPoint": "/var/nfs/volumes/shared-vol",
        "CreatedTime": "Fri May 06 04:26:12 +0000 2016",
        "DriverInfo": {
            "Driver": "vfs",
            "MountPoint": "/var/nfs/volumes/shared-vol",
            "Path": "/var/nfs/volumes/shared-vol",
            "PrepareForVM": "false",
            "Size": "0"
        },
        "Snapshots": {}
    }
}

After reboot:

sudo convoy list
{
    "b6139d73-666c-4c52-aa6c-7ef912c6a051": {
        "UUID": "b6139d73-666c-4c52-aa6c-7ef912c6a051",
        "Name": "shared-vol",
        "Driver": "vfs",
        "MountPoint": "",
        "CreatedTime": "Fri May 06 04:26:12 +0000 2016",
        "DriverInfo": {
            "Driver": "vfs",
            "MountPoint": "",
            "Path": "/var/nfs/volumes/shared-vol",
            "PrepareForVM": "false",
            "Size": "0"
        },
        "Snapshots": {}
    }
}
deviantony commented 8 years ago

For example I created a shared volume and a container using it:

$ docker volume create -d convoy --name shared-vol

$ docker run -d -p 80:80 --net my_shared_network -v shared-vol:/usr/share/nginx/html --name nginx1 nginx

After restarting the host, if I want to restart a container using a shared volume, I get the following error:

$ docker start nginx1
Error response from daemon: Error response from daemon: get shared-vol: VolumeDriver.Get: Handler not found: POST /VolumeDriver.Get
yasker commented 8 years ago

Hi @deviantony

Please give a try https://github.com/rancher/convoy/releases/tag/v0.5.0-rc1 . It should fix this issue.

Notice it's not compatible with previous Convoy's configuration file. You may need a new setup to try it on.

yasker commented 8 years ago

In fact it's a duplicate of #112 , will close this one for now.