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

Show better error message when pool doesn't exist for volume/image #50

Open
flaviostutz opened this issue Jul 29, 2018 · 0 comments
Open

Comments

@flaviostutz
Copy link

flaviostutz commented Jul 29, 2018

I run the following command "docker run -it --rm --volume-driver=rbd --name first --volume mypool/myimage:/mnt/foo ubuntu /bin/bash -c "echo -n 'Hello ' >> /mnt/foo/hello"

"mypool" didn't exist, so I had the following message: "docker: Error response from daemon: create mypool/myimage: VolumeDriver.Create: Unable to create Ceph RBD Image(myimage): exit status 2.
See 'docker run --help'."

Logs:

ceph-driver_1  | 2018/07/28 06:35:01 driver.go:687: INFO: Attempting to create new RBD Image: (mypool/myimage, %!s(int=20480), xfs)
ceph-driver_1  | 2018/07/28 06:35:01 utils.go:73: DEBUG: shWithTimeout: 2m0s, rbd, [--pool mypool --conf /etc/ceph/ceph.conf --id admin create --image-format 2 --size 20480 myimage]
ceph-driver_1  | 2018/07/28 06:35:01 utils.go:38: DEBUG: sh CMD: &{"/usr/bin/rbd" ["rbd" "--pool" "mypool" "--conf" "/etc/ceph/ceph.conf" "--id" "admin" "create" "--image-format" "2" "--size" "20480" "myimage"] [] "" <nil> <nil> <nil> [] %!q(*syscall.SysProcAttr=<nil>) %!q(*os.Process=<nil>) "<nil>" <nil> <nil> %!q(bool=false) [] [] [] [] %!q(chan error=<nil>) %!q(chan struct {}=<nil>)}
ceph-driver_1  | 2018/07/28 06:35:01 driver.go:203: ERROR: Unable to create Ceph RBD Image(myimage): exit status 2

I discovered the reason by running manually the command the driver was issuing:
"/usr/bin/rbd --pool mypool --conf /etc/ceph/ceph.conf --id admin create --image-format 2 --size 20480 myimage"
Now the log told me the pool didn't exist.

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

1 participant