convoy
convoy copied to clipboard
Other swarm members can't mount a volume that was attached to a terminated instance
- Setup an AWS docker swarm with convoy installed on each node
- Create an EBS volume through docker py:
swarm_client.create_volume(
name='someuuid',
driver='convoy',
driver_opts={
'size': '20G',
}
)
- Create a container that mounts the EBS volume
- Terminate container
- Build new container with the same instructions and join the docker swarm
- Create the same container and it creates a new volume but it says internally it can't find the volume (from the logs):
{"level":"debug","msg":"Handle plugin get volume: POST /VolumeDriver.Get","pkg":"daemon","time":"2016-07-03T06:57:47Z"}
{"level":"debug","msg":"Request from docker: \u0026{b-rethinkdb-montage-c18f2db3_c6d2_4f2f_a841_6d6bbcba8183 map[]}","pkg":"daemon","time":"2016-07-03T06:57:47Z"}
{"level":"debug","msg":"Response: {\n\t\"Err\": \"Could not find volume b-rethinkdb-montage-c18f2db3_c6d2_4f2f_a841_6d6bbcba8183.\"\n}","pkg":"daemon","time":"2016-07-03T06:57:47Z"}
- docker inspect <the_container_id> and notice that volumes changed to local:
"Mounts": [
{
"Name": "b-rethinkdb-montage-5d1d7480_67cb_4644_a3be_380cfa8fc3bc",
"Source": "/var/lib/docker/volumes/b-rethinkdb-montage-5d1d7480_67cb_4644_a3be_380cfa8fc3bc/_data",
"Destination": "/data",
"Driver": "local",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
],
- EBS volume exists and is detached
- create another volume and container and see the docker inspect lists the driver as
convoy
This might be a duplicate of #125
Edit:
- Convoy 5.0-rc1
- Docker 1.11.2
- Swarm 1.2.3
@zbyte64 looks like it's in a different host and EBS volume is not recognized. Convoy is not a distributed system so the Convoy on the other host doesn't know about the volume at all.
You can create the volume on the host beforehand using --id parameter for convoy create, but I think it's may not be the optimal solution to you. I need to look into this and see if we can find a better way to do this.
Having to create the volume again would not work well with swarm rescheduler: https://docs.docker.com/swarm/scheduler/rescheduling/