How to make it work with docker
Hi, hustcat,
Thanks for your work on the ceph graph driver. I have build & run it successfully, but don't know how to let docker use it for backend storage.
I saw the PR of graphdriver_extpoints from cpuguy83 has been merged: https://github.com/docker/docker/commit/4c55464dd3fbbecb0e67f9b33c54f62f3982b500 https://github.com/docker/docker/blob/release/v1.9/experimental/plugins_graphdriver.md
And I've got experimental binary: https://experimental.docker.com/builds/Linux/x86_64/docker-latest
# docker -v
Docker version 1.9.1, build f4c9adf, experimental
But don't know how to enable the feature ...
# docker daemon -s rbd
WARN[0000] Running experimental build
INFO[0000] API listen on /var/run/docker.sock
ERRO[0000] Failed to GetDriver graph rbd /var/lib/docker/0.0
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported
Best regards!
The plugin is already running and listening:
# /root/bin/docker-graph-driver -D -s rbd
DEBU[0000] Rbd setup base image
INFO[0000] listening on /run/docker/plugins/rbd.sock
DEBU[0000] root group found. gid: 0
Test it OK:
# echo -e "POST /Plugin.Activate HTTP/1.0\r\n" | nc -U /run/docker/plugins/rbd.sock
HTTP/1.0 200 OK
Content-Type: appplication/vnd.docker.plugins.v1+json
Date: Fri, 15 Jan 2016 02:10:55 GMT
Content-Length: 32
{"Implements": ["GraphDriver"]}
The output of adding -D to docker daemon:
# docker daemon -D -s rbd
WARN[0000] Running experimental build
DEBU[0000] docker group found. gid: 118
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock)
INFO[0000] API listen on /var/run/docker.sock
DEBU[0000] Creating actual daemon root: /var/lib/docker/0.0
DEBU[0000] [graphdriver] trying provided driver "rbd"
DEBU[0000] rbd's manifest: &{[GraphDriver]}
DEBU[0000] rbd implements: GraphDriver
ERRO[0000] Failed to GetDriver graph rbd /var/lib/docker/0.0
FATA[0000] Error starting daemon: error initializing graphdriver: driver not supported
Stop the docker-graph-driver pluging and run docker, the output is:
# docker daemon -D -s rbd
WARN[0000] Running experimental build
DEBU[0000] docker group found. gid: 118
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock)
INFO[0000] API listen on /var/run/docker.sock
DEBU[0000] Creating actual daemon root: /var/lib/docker/0.0
DEBU[0000] [graphdriver] trying provided driver "rbd"
WARN[0000] Unable to connect to plugin: /run/docker/plugins/rbd.sock, retrying in 1s
WARN[0001] Unable to connect to plugin: /run/docker/plugins/rbd.sock, retrying in 2s
WARN[0003] Unable to connect to plugin: /run/docker/plugins/rbd.sock, retrying in 4s
WARN[0007] Unable to connect to plugin: /run/docker/plugins/rbd.sock, retrying in 8s
ERRO[0015] Failed to GetDriver graph rbd /var/lib/docker/0.0
FATA[0015] Error starting daemon: error initializing graphdriver: driver not supported
Was this ever resolved? I'm interested in trying this as well. Thanks for the complete debugging output.