Project

General

Profile

Actions

Bug #6693

closed

"rbd ls" returns error if the pool empty

Added by Zoltan Arnold Nagy over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

if the pool exists but only empty, instead of not returning anything, it returns an error message that it's empty, and returns a -1 error code.

this breaks OpenStack:
2013-10-31 10:28:23.081 17751 TRACE nova.compute.manager [instance: d517287d-76ee-4501-89bd-752e97e7615c] Command: rbd -p zc2ephemeral ls
2013-10-31 10:28:23.081 17751 TRACE nova.compute.manager [instance: d517287d-76ee-4501-89bd-752e97e7615c] Exit code: 1
2013-10-31 10:28:23.081 17751 TRACE nova.compute.manager [instance: d517287d-76ee-4501-89bd-752e97e7615c] Stdout: ''
2013-10-31 10:28:23.081 17751 TRACE nova.compute.manager [instance: d517287d-76ee-4501-89bd-752e97e7615c] Stderr: "rbd: pool xypool doesn't contain rbd images\n

besides behaving incorrectly, this breaks openstack, so current latest stable from both (dumpling/havana) is not usable, so please backport.

Actions #1

Updated by Josh Durgin over 10 years ago

  • Priority changed from Immediate to High

I agree the exit code should be 0 in this case, but I'm downgrading the priority since there's an easy workaround and it only affects a new piece of functionality in openstack that's already broken for other reasons.

This only breaks nova's local rbd use, which is already broken for other reasons (https://bugs.launchpad.net/nova/+bug/1233188 and https://bugs.launchpad.net/nova/+bug/1226351). Cinder never users 'rbd ls'. Nova should be fixed to not use it as well.

A work around is to create and delete an image in the pool nova is using. This will create the rbd_directory object, whose non-existence is causing 'rbd ls' to return the error.

Actions #2

Updated by Josh Durgin over 10 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Josh Durgin
  • Source changed from other to Community (dev)
Actions #3

Updated by Josh Durgin over 10 years ago

  • Status changed from Fix Under Review to Resolved

commit:ac547a5b7dc94282f079aef78e66348d99d9d5e9

Actions

Also available in: Atom PDF