Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make it work with docker #1

Open
ptptptptptpt opened this issue Jan 14, 2016 · 2 comments
Open

How to make it work with docker #1

ptptptptptpt opened this issue Jan 14, 2016 · 2 comments

Comments

@ptptptptptpt
Copy link

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:
moby/moby@4c55464
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!

@ptptptptptpt
Copy link
Author

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

@bacaldwell
Copy link

Was this ever resolved? I'm interested in trying this as well. Thanks for the complete debugging output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants