Bug 1471482

Summary: cinder reset-state [vol_id] --reset-migration-status -> leaves volume in a "semi" attached state
Product: Red Hat OpenStack Reporter: Tzach Shefi <tshefi>
Component: openstack-cinderAssignee: Jon Bernard <jobernar>
Status: CLOSED NOTABUG QA Contact: Avi Avraham <aavraham>
Severity: low Docs Contact:
Priority: low    
Version: 8.0 (Liberty)CC: eharney, jobernar, pgrist, scohen, srevivo, tshefi
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-08 18:05:41 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:
Attachments:
Description Flags
Cinder and Nova logs none

Description Tzach Shefi 2017-07-16 10:37:55 UTC
Created attachment 1299294 [details]
Cinder and Nova logs

Description of problem: While clearing a failed Cinder volume migrate error state, Cinder list still shows volume as attached, yet nova detach says volume isn't attached. This might end-up being a Nova attach/detach bug. 

Version-Release number of selected component (if applicable):
rhel7.3  
python-novaclient-3.1.0-2.el7ost.noarch
python-nova-12.0.6-13.el7ost.noarch
openstack-nova-common-12.0.6-13.el7ost.noarch
openstack-nova-compute-12.0.6-13.el7ost.noarch
openstack-nova-conductor-12.0.6-13.el7ost.noarch
python-cinder-7.0.3-6.el7ost.noarch
openstack-cinder-7.0.3-6.el7ost.noarch
python-cinderclient-1.5.0-1.el7ost.noarch

How reproducible:
Unsure


Steps to Reproduce:
1. Configure a dual cinder system 
2. Create a volume, attach it to an instance
3. Cinder migrate the volume from one backend to the other.    (cause it to fail, in my case I think being attached caused migration error, I suspect causing migration to fail can also be done if there is insufficient free space on target backend.  
4. Cinder list - see migration error state
5. Cinder reset-state [vol_id] --migration..
6. Check cinder status of volume - still attached
7. Try nova volume-detach -> hit bug reports volume is already detached. 

Actual results:
Failed to detach a volume but Cinder still reports it as attached. 


Expected results:
Cinder reset-state of a detached volume, should be synced with Nova volume status. 

Additional info: