Bug 1480490

Summary: [Huawei] [Defect] [Cinder] - Huawei Storage Cinder driver fixs metadata issues by change private date storing place in Redhat openstack 11
Product: Red Hat OpenStack Reporter: zhouweigang09
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED ERRATA QA Contact: Avi Avraham <aavraham>
Severity: high Docs Contact:
Priority: medium    
Version: 11.0 (Ocata)CC: jniu, pgrist, srevivo, xiongtaifu
Target Milestone: ---Keywords: OtherQA, TestOnly, Triaged, ZStream
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-cinder-10.0.4-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-13 16:29:16 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: 1481790    
Bug Blocks:    

Description zhouweigang09 2017-08-11 09:07:21 UTC
Description of problem:

Change Huawei driver's private data storing place to fix issues below:

This patch is to fix issues at two circumstances:
1. Create volume from image by non-admin user, this operation will fail because Huawei driver tries to record LUN WWN at admin metadata, however non-admin user doesn't have the admin metadata access right, so exception is raised.

2. Restore volume backup to 3rd volume, this operation will also restore backup volume's metadata to the 3rd volume, but the data recorded in metadata is strong correlative to the corresponding LUN at backend storage, so this will break the one-to-one relationship between the restored volume and the LUN at storage.

To fix the issues above, we moved all LUN private data to provider_location, stored as a dict string, not use admin metadata or metadata to store LUN private data.

So it's necessary to backport to redhat openstack 11(Ocata) stable branch for Huawei cinder driver.



Version-Release number of selected component (if applicable):
Redhat Openstack 11, python-cinder

How reproducible:

Steps to Reproduce:
1. login as no-admin user
2. excute create a volume from image task
3. create task failed

Actual results:
create task fails due to admin metadata access Permission denied。


Expected results:
Create a volume from image from non-admin user successfully.


Additional info:
The openstack community in Newton has fixed this bug in blueprint:
https://review.openstack.org/#/c/486025

Primary Red Hat contact: 
        a. Name: Jingjing Niu 
        b. Email:   jniu
 Primary Partner contact: 
        a. Name: Taifu Xiong
        b. Email:  xiongtaifu
        c. Primary Phone: 15922901778

Comment 1 Eric Harney 2017-09-05 14:19:59 UTC
This may require this follow-up:

https://review.openstack.org/#/c/500746/

Comment 2 zhouweigang09 2017-09-15 01:30:13 UTC
Hi ,

This issue is fixed in below bugzilla id which is already released.  
The version is openstack-cinder-10.0.4-3.el7ost.noarch

https://bugzilla.redhat.com/show_bug.cgi?id=1481790

Comment 3 Lon Hohberger 2017-10-10 18:09:12 UTC
According to our records, this should be resolved by openstack-cinder-10.0.4-3.el7ost.  This build is available now.

Comment 6 errata-xmlrpc 2018-02-13 16:29:16 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://access.redhat.com/errata/RHBA-2018:0306