Description
Hello,
I am currently attempting to deploy Portainer as part of a swarm on a local Vagrant environment (3 Ubuntu 16.04 machines, one manager and two workers). When I specify a volume to persist Portainer data the service continuously fails with task: non-zero exit (1) and when I run docker service logs
I see the following error: invalid argument. The section of the stack YAML file pertaining to Portainer is like so:
portainer:
image: portainer/portainer:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /volumes/monitor/portainer/data:/data
deploy:
placement:
constraints:
- node.role == manager
networks:
- monitor
It should also be noted that when I do not specify the volume for Portainer data the service runs with no issues at all.
Additional Info: The root of the portainer volume /volumes
is within a shared folder on vagrant that has permissions set to 777 for both directory and file mode.
Any help anyone could give would be greatly appreciated. Thank you.
Steps to reproduce the issue:
docker stack deploy
Technical details:
docker run -p 9000:9000 portainer/portainer
): Run in docker swarm (explained above)I just tried creating the Portainer volume outside of the shared directory and the service started with no issues, so it looks like the permissions on the shared vagrant folder must have been causing the problem. I'll close this now and report back anymore findings.
The issue is actually the Virtual Box synced (shared) folder mechanism, changing the shared folder to use NFS fixes the issue.
@ChexWarrior Stumbled across this as well. Question is - shouldn't it work with VirtualBox synced folders too?
Most helpful comment
@ChexWarrior Stumbled across this as well. Question is - shouldn't it work with VirtualBox synced folders too?