Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1064839

Summary: cinder-python: cannot delete a backup stuck in creating
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-cinderclientAssignee: Jakub Ruzicka <jruzicka>
Status: CLOSED UPSTREAM QA Contact: Giulio Fidente <gfidente>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0CC: eharney, jruzicka, scohen, yeylon
Target Milestone: ---   
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-18 14:44:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dafna Ron 2014-02-13 11:57:24 UTC
Description of problem:

I have a backup stuck in creating and it cannot be deleted unless it's in error or available state. 
cinder has reset state for volumes and snapshots but none for backups which means that if the backup create is stuck there is no way of deleting it. 

Version-Release number of selected component (if applicable):

[root@puma31 ~(keystone_admin)]# rpm -qa |grep cinder
python-cinderclient-1.0.7-2.el6ost.noarch
openstack-cinder-2013.2.1-5.el6ost.noarch
python-cinder-2013.2.1-5.el6ost.noarch

How reproducible:

100%

**please note that someone else created the backup in my setup so I am not sure what the failure was- however, this bug is just about the status change ability** 

Steps to Reproduce:
1. create a backup and change it's status to creating (directly in db)
2. try to remove the volume 
3. 

Actual results:

we cannot delete the backup and do not have ability in cli to reset the backup state. 

Expected results:

we should be able to have a way to reset the state. 

Additional info:

[root@puma31 ~(keystone_admin)]# cinder backup-list 
+--------------------------------------+--------------------------------------+----------+-------------------+------+--------------+---------------+
|                  ID                  |              Volume ID               |  Status  |        Name       | Size | Object Count |   Container   |
+--------------------------------------+--------------------------------------+----------+-------------------+------+--------------+---------------+
| 10987619-2198-447e-8916-d8333c560526 | 8383f459-b58a-492e-840e-48d1be009b9b | creating | Backup-1588937630 |  1   |     None     |      None     |
| e857a499-97ae-4c15-9bee-1347fd2729a0 | 65c6cac8-f1e4-4b46-9d24-d7f583573170 |  error   |    dafna_backup   |  10  |     None     | volumebackups |
+--------------------------------------+--------------------------------------+----------+-------------------+------+--------------+---------------+
[root@puma31 ~(keystone_admin)]# cinder backup-delete e857a499-97ae-4c15-9bee-1347fd2729a0
[root@puma31 ~(keystone_admin)]# cinder backup-delete 10987619-2198-447e-8916-d8333c560526
ERROR: Invalid backup: Backup status must be available or error (HTTP 400) (Request-ID: req-ee302b3f-2d55-4ec6-8e75-18b17fa81be5)
[root@puma31 ~(keystone_admin)]# cinder help |grep reset
    reset-state         Explicitly update the state of a volume.
    snapshot-reset-state

Comment 1 Jakub Ruzicka 2014-02-18 14:44:57 UTC
It would be nice to do this through client and this wishlist bug has been filed in upstream bugtracker.

I see no benefit of tracking this downstream.