I’m facing a problem when I try to deploy a service that uses rexray volume in a swarm (swarm mode) cluster on AWS.
I have previously created a rexray volume that I’m trying to attach to the service:
$ docker volume ls DRIVER VOLUME NAME rexray packagist
Then when I try to use it in a service it does not work:
$ docker service create --name satis-packagist \ --mount type=volume,volume-driver=rexray,source="packagist",target=/satisfy/web/ \ localhost:5000/satis/packagist $ docker service ls ID NAME REPLICAS IMAGE COMMAND 6tw84yv7g24k satis-packagist 0/1 localhost:5000/satis/packagist
I don’t know how to debug it, I’ve not seen anything on “docker events”, neither on logs on any node of the cluster.
I’m sure that the problem is related with the volume because when I remove the mount line it works as expected:
$ docker service create --name satis-packagist \ localhost:5000/satis/packagist $ docker service ls ID NAME REPLICAS IMAGE COMMAND ewr9lv9shr1b satis-packagist 1/1 localhost:5000/satis/packagist
And I can check the container logs as usual.
The volume is available and correct because if I launch it via docker run it works correctly.
$ docker run --rm --name satis-packagist \ --volume-driver=rexray -v packagist:/satisfy/web/ \ localhost:5000/satis/packagist