Cinder force-delete always sets exit code 0

Bug #1358670 reported by Geoff Willett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Invalid
Undecided
ugvddm

Bug Description

a cinder force-delete command sets an exit status of '0' even if the command fails to delete the volume:

[root@ldtdsraio0009 cinder(keystone_admin)]# cinder list | grep VOL_51
| ebf6d8e6-67f6-4f04-8894-71aaf02856a3 | error_deleting | SVC-OPENSTACK_VOL_51 | 19 | SVC-OPENSTACK | false | |

[root@ldtdsraio0009 cinder(keystone_admin)]# cinder force-delete SVC-OPENSTACK_VOL_51
[root@ldtdsraio0009 cinder(keystone_admin)]# echo $?
0
[root@ldtdsraio0009 cinder(keystone_admin)]# cinder list | grep VOL_51
| ebf6d8e6-67f6-4f04-8894-71aaf02856a3 | error_deleting | SVC-OPENSTACK_VOL_51 | 19 | SVC-OPENSTACK | false | |

Note: The reason for the delete failing was valid (the volume was still mounted to the host).

ugvddm (271025598-9)
Changed in cinder:
assignee: nobody → ugvddm (271025598-9)
ugvddm (271025598-9)
affects: cinder → python-cinderclient
Revision history for this message
John Griffith (john-griffith) wrote :

Assuming cinder API V1?

Running on V2:
jgriffith@bdr-77 /opt/stack/python-cinderclient/cinderclient $ cinder force-delete 15b4e139-2622-4cf9-8907-f33a8a0f2b42
Delete for volume 15b4e139-2622-4cf9-8907-f33a8a0f2b42 failed: Volume 15b4e139-2622-4cf9-8907-f33a8a0f2b42 is still attached, detach volume first. (HTTP 400) (Request-ID: req-c3b81c53-9b8e-4501-b0ca-a36c4a26a349)
ERROR: Unable to force delete any of specified volumes.
jgriffith@bdr-77 /opt/stack/python-cinderclient/cinderclient :( $ echo $?
1

I'll setup V1 later and verify it unless somebody beats me to it.

Revision history for this message
ugvddm (271025598-9) wrote :
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Cleanup

Closing stale bug. If this is still an issue please reopen.

Changed in python-cinderclient:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.