Look for volumes in a different location than default #9600
Atul-Torane
started this conversation in
Ideas
Replies: 3 comments
-
|
Portainer is hard coded to look in var/lib/docker/volumes.
When you start portainer, you can try to adjust the bind mount like -v /data1/dockerconfig:/var/lib/docker/volumes
But that only lets you set on path across all nodes.
Rgds,
Neil Cresswell
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
is it possible that portainer agent look volumes path where my docker is installed ???? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
When I try to browse volume it is always searching volumes folder in /var/lib/docker/volume, but my docker is installed in /data1/dockerconfig/ in 2 servers and /data2/dockerconfig in remaining 6 servers.
Expected behavior
Portainer agent should browse volumes location where my docker is installed.
Portainer Logs



Please find portainer agent logs. Sharing snap of UI.
2020/03/10 15:13:23 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker6-be3d0c99a56c 10.0.0.98,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker1-cd778fd94e4e 10.0.0.93,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker8-003276d46d86 10.0.0.100,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker7-aca22d12f203 10.0.0.99,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker3-e80239b6b744 10.0.0.94,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker4-8e52840faa96 10.0.0.95,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker2-4af0f849103b 10.0.0.97,
2020/03/10 15:13:26 [INFO] serf: EventMemberJoin: g060104dnfvbdocker5-ea227bf1db37 10.0.0.96,
2020/03/10 15:13:27 [INFO] [http] [server_addr: 0.0.0.0] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/10 15:13:39 http error: Missing request signature headers (err=Unauthorized) (code=403),
2020/03/10 15:41:38 http error: Unable to list files inside specified directory (err=open /var/lib/docker/volumes/NFVGW/_data: no such file or directory) (code=500),
2020/03/12 13:53:39 [WARN] [http,docker,cluster] [node: g060104dnfvbdocker5] [message: Unable to retrieve node resources for aggregation] [error: parse https://10.0.0.96:9001%00/volumes: invalid port ":9001%00" after host],
2020/03/14 14:41:00 http error: Unable to list files inside specified directory (err=open /var/lib/docker/volumes/NFVGW/_data: no such file or directory) (code=500),
You can see how here
Steps to reproduce the issue:
Technical details:
Portainer Command --> docker service create --name portainer --network portainer_agent_network --publish 9000:9000 --publish 8000:8000 --replicas=1 --constraint 'node.role == manager' portainer/portainer:1.23.1 -H "tcp://tasks.portainer_agent:9001" --tlsskipverify
Portainer Agent --> docker service create --name portainer_agent --network portainer_agent_network --mode global --constraint 'node.platform.os == linux' --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind**,src=//var/lib/docker/volumes**,dst=/var/lib/docker/volumes portainer/agent
Note : In above command if I use my docker installation volume path /data1/dockerconfig/volumes instead of ,src=//var/lib/docker/volumes, then it will not work because only 2 servers has /data1/dockerconfig/volumes path as already mention in Bug description.
Beta Was this translation helpful? Give feedback.
All reactions