Bug 1444828

Summary: Regression: OpenStack Cinder StorageClass Ignores Availability Zone
Product: OpenShift Container Platform Reporter: Pavel Pospisil <ppospisi>
Component: StorageAssignee: hchen
Status: CLOSED ERRATA QA Contact: Jianwei Hou <jhou>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: aos-bugs, jrosenta, smunilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-10 05:21:25 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 Pavel Pospisil 2017-04-24 11:51:29 UTC
Description of problem:
Kubernetes versions up to 1.5 used rackspace/gophercloud library [2] to communicate with OpenStack Cinder API. However, Kubernetes 1.6 uses gophercloud/gophercloud library [3] instead of rackspace/gophercloud and the gophercloud/gophercloud library contains a bug [4] that is not present in rackspace/gophercloud library.

Note: the bug [4] is fixed in gophercloud/gophercloud library by pull request [5] that is already merged.
However, Kubernetes 1.6 uses an old version of gophercloud/gophercloud library that contains the bug [4].
The bug is fixed in Kubernetes 1.7 by pull request [6].

So as soon as OpenShift 3.6 Origin is rebased on top of Kubernetes 1.6 by pull request [1] and the pull request [1] is merged into OpenShift 3.6 Origin this regression will show up.

[1] https://github.com/openshift/origin/pull/13653
[2] https://github.com/rackspace/gophercloud
[3] https://github.com/gophercloud/gophercloud
[4] https://github.com/gophercloud/gophercloud/issues/245
[5] https://github.com/gophercloud/gophercloud/pull/246
[6] https://github.com/kubernetes/kubernetes/pull/44082

Version-Release number of selected component (if applicable):
The regression is present in Kubernetes 1.6 and is fixed in Kubernetes 1.7.

How reproducible: 100%

Steps to Reproduce:
1. Have OpenStack with at least 2 different availability zones and Cinder v1 API available.
2. Have OpenShift 3.6 installed into the OpenStack and integrated.
3. Create an OpenStack Cinder StorageClass that requests a particular availability zone, e.g.
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: zone1
provisioner: kubernetes.io/cinder
parameters:
  availability: zone-1
4. Create a PVC that uses the above StorageClass and have a Cinder volume provisioned. The volume is not provisioned in the requested availability zone, e.g. "zone-1" but in availability zone "nova". This is incorrect.

Actual results:
Volume provisioned in availability zone "nova".

Expected results:
Volume provisioned in availability zone "zone-1".

Master Log: N/A

Node Log (of failed PODs): N/A

PV Dump: N/A

PVC Dump: N/A

StorageClass Dump (if StorageClass used by PV/PVC): N/A

Additional info:
Solution: OpenShift 3.6 uses a newer version of the gophercloud/gophercloud library that has the bug [4] fixed.

Comment 1 Pavel Pospisil 2017-04-28 15:17:54 UTC
Created pull request: https://github.com/openshift/origin/pull/13954

Comment 2 Pavel Pospisil 2017-05-03 11:21:21 UTC
The PR [1] is a subset of the PR [2]. That's why the PR [1] was closed without merge. This bug will be fixed by PR [2].

[1] https://github.com/openshift/origin/pull/13954
[2] https://github.com/openshift/origin/pull/14005

Comment 7 Jianwei Hou 2017-06-27 09:22:36 UTC
Tested on openshift v3.6.122

Currently we could not find an OpenStack that supports cinder volume in multiple availability zones, so the followings are tested:
- Volume could provision in target availability zone.
- Use a different zone name, volume will not be created in the 'nova' zone, pvc will stay pending.

Mark as verified because the regression testing passed.

Comment 9 errata-xmlrpc 2017-08-10 05:21:25 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/RHEA-2017:1716

Comment 10 hchen 2018-02-21 16:32:28 UTC
*** Bug 1537150 has been marked as a duplicate of this bug. ***