Bug 1399760

Summary: rbd snapshot delete fails if backend is missing file
Product: Red Hat OpenStack Reporter: Eric Harney <eharney>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED ERRATA QA Contact: Tzach Shefi <tshefi>
Severity: low Docs Contact:
Priority: low    
Version: 7.0 (Kilo)CC: dhill, egafford, srevivo, tshefi
Target Milestone: asyncKeywords: ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-cinder-2015.1.3-12.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1399733
: 1399763 (view as bug list) Environment:
Last Closed: 2017-02-15 23:00:09 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:
Bug Depends On: 1399741    
Bug Blocks: 1399733, 1399763    

Description Eric Harney 2016-11-29 16:43:19 UTC
+++ This bug was initially created as a clone of Bug #1399733 +++

Description of problem:
rbd snapshot delete fails if backend is missing file

Is it possible to backport this patch [1] to RHOSP 5?  It is a simple patch that will simply pass if this file is missing

[1] https://bugs.launchpad.net/cinder/+bug/1415905

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


How reproducible:
Somtimes

Steps to Reproduce:
1. Missing patch
2.
3.

Actual results:
Fails deleting the snapshot

Expected results:
Succeeds


Additional info:

Comment 2 Tzach Shefi 2017-02-06 05:56:07 UTC
Verified, 

Version
python-cinder-2015.1.3-12.el7ost.noarch
openstack-cinder-2015.1.3-12.el7ost.noarch

Created a volume snapshot, via rbd commands deleted snapshot's backend file, then I successfully deleted Cinder snapshot, steps below:L  


#cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 54724e6e-dd0f-4686-b219-09339067b8a5 | available |     vol1     |  1   |      -      |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

#cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+
|                  ID                  |              Volume ID               |   Status  | Display Name | Size |
+--------------------------------------+--------------------------------------+-----------+--------------+------+
| ed8e4c11-c8e4-43ce-a7fd-bbf0398726f6 | 54724e6e-dd0f-4686-b219-09339067b8a5 | available |  snap-vol1   |  1   |
+--------------------------------------+--------------------------------------+-----------+--------------+------+


#rbd -p volumes ls -l                                                                                                                                                  
NAME                                                                                       SIZE PARENT FMT PROT LOCK                                                                         
volume-54724e6e-dd0f-4686-b219-09339067b8a5                                               1024M          2           
volume-54724e6e-dd0f-4686-b219-09339067b8a5@snapshot-ed8e4c11-c8e4-43ce-a7fd-bbf0398726f6 1024M          2 yes      

#rbd -p volumes snap unprotect volume-54724e6e-dd0f-4686-b219-09339067b8a5@snapshot-ed8e4c11-c8e4-43ce-a7fd-bbf0398726f6

# rbd -p volumes snap rm volume-54724e6e-dd0f-4686-b219-09339067b8a5@snapshot-ed8e4c11-c8e4-43ce-a7fd-bbf0398726f6 

# rbd -p volumes ls -l
NAME                                         SIZE PARENT FMT PROT LOCK 
volume-54724e6e-dd0f-4686-b219-09339067b8a5 1024M          2   

#cinder snapshot-delete ed8e4c11-c8e4-43ce-a7fd-bbf0398726f6
#cinder snapshot-list
+----+-----------+--------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+----+-----------+--------+--------------+------+
+----+-----------+--------+--------------+------+

As expected Cinder snapshot ^ was deleted, despite missing back end file.

Comment 4 errata-xmlrpc 2017-02-15 23:00:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0282.html