Bug 1296492

Summary: Volume id is changed during retype a volume
Product: Red Hat OpenStack Reporter: lkuchlan <lkuchlan>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED NOTABUG QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eharney, geguileo, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-26 16:47:06 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:
Attachments:
Description Flags
logs none

Description lkuchlan 2016-01-07 11:04:17 UTC
Description of problem:
After retype a volume to a new back end, the volume id is changed under /var/lib/cinder/mnt/ , while under cinder list the id is not changed.
The volume id is not matching between cinder list to /var/lib/cinder/mnt/ 
* In my setup I used with Netapp-nfs as back end

Version-Release number of selected component (if applicable):
openstack-cinder-2014.2.3-11.el7ost.noarch
python-cinder-2014.2.3-11.el7ost.noarch
python-cinderclient-1.1.1-1.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Retype a volume to a new back end  


Actual results:
Volume id is changed under /var/lib/cinder/mnt/

Expected results:
The volume id should not change and should be matching between cinder list to /var/lib/cinder/mnt/

Additional info:

Comment 1 lkuchlan 2016-01-07 11:31:52 UTC
Created attachment 1112418 [details]
logs

Comment 2 Gorka Eguileor 2016-01-26 16:47:06 UTC
Current behavior is considered correct, since there are different identifiers for a volume, the Cinder identifier and the identifier in the backend. and there's no requirement that these 2 need to match, so this is not really a bug.

When doing a migration we'll be changing the backend identifier associated to the cinder identifier in all drivers.  Only in latest OSP versions some drivers will try to rename the backend volume identifier to match the cinder identifier and leave it unchanged if cannot change it, for the sake of convenience, not because it is a bug.

If the name_id of the volume in the DB does not match the new id, then that would be a bug.