Bug #7973
rbd ls returns error code of 1 on empty pool
0%
Description
Using version 0.67.7 rbd ls is returning an error code of 1 on an empty pool. This is causing OpenStack Havana problems when trying to launch an instance while the pool is empty.
Creating and deleting an image is a route around the problem as that leaves the rbd_directory in place.
juanjose@aurora:~$ rbd -v
ceph version 0.67.7 (d7ab4244396b57aac8b7e80812115bbd079e6b73)
juanjose@aurora:~$ rbd ls -p test
rbd: pool test doesn't contain rbd images
juanjose@aurora:~$ echo $?
1
juanjose@aurora:~$ rbd create -p test test_image --size 100
juanjose@aurora:~$ rbd ls -p test
test_image
juanjose@aurora:~$ echo $?
0
juanjose@aurora:~$ rbd rm test_image -p test
Removing image: 100% complete...done.
juanjose@aurora:~$ rbd ls -p test
juanjose@aurora:~$ echo $?
0
juanjose@aurora:~$ rados ls -p test
rbd_directory
History
#1 Updated by Ian Colle almost 10 years ago
- Assignee set to Josh Durgin
- Priority changed from Normal to Urgent
#2 Updated by Josh Durgin almost 10 years ago
- Status changed from New to Resolved
This is the same as #6693. Backported the fix to the dumpling branch in commit:c66b61f9dcad217429e4876d27881d9fb2e7666f