Bug 1390826 - PVC failed to bind while using storage class
Summary: PVC failed to bind while using storage class
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Zac Herman
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-02 03:14 UTC by Wenqi He
Modified: 2017-03-08 18:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Binding via storage classes was originally done using the alpha level of services and that value was hard coded. The test case used the beta level to set a default storage class. This caused a conflict when trying to bind the storage classes that resulted in an error and a failure to assign the storage class properly. The fix was to bring everything up to the same service level which remains storageclass.beta.kubernetes.io. Result:
Clone Of:
Environment:
Last Closed: 2017-01-13 16:17:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Wenqi He 2016-11-02 03:14:21 UTC
Description of problem:
While create pvc using storage class, the pvc cannot be bound with dynamic provision

Version-Release number of selected component (if applicable):
oc v3.4.0.18+ada983f
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://104.154.117.67:8443
openshift v3.4.0.18+ada983f
kubernetes v1.4.0+776c994


How reproducible:
Always

Steps to Reproduce:
1.Create storage two storage class via CLI as admin

$ cat default.yml | oc create -f -
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
  name: default 
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/gce-pd

$ cat gcesc.yml | oc create -f -
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
  name: gce
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "false"
provisioner: kubernetes.io/gce-pd

2. Create pvc on web console and select storageclass as gce
3. Check pvc status

Actual results:
PVC keeps pending status due to error below:

$ oc describe pvc wehe

  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  10m		5m		21	{persistentvolume-controller }			Normal		ProvisioningIgnoreAlpha	both
"volume.alpha.kubernetes.io/storage-class" and "volume.beta.kubernetes.io/storage-class" annotations are present, using
"volume.beta.kubernetes.io/storage-class"
  10m		5m		21	{persistentvolume-controller }			Warning		ProvisioningFailed	Failed to provision volume with StorageClass
"default": claim.Spec.Selector is not supported for dynamic provisioning on GCE
  5m		2s		22	{persistentvolume-controller }			Normal		ProvisioningIgnoreAlpha	both
"volume.alpha.kubernetes.io/storage-class" and "volume.beta.kubernetes.io/storage-class" annotations are present, using
"volume.beta.kubernetes.io/storage-class"
  5m		2s		22	{persistentvolume-controller }			Warning		ProvisioningFailed	Failed to provision volume with StorageClass
"default": claim.Spec.Selector is not supported for dynamic provisioning on GCE

$ oc get pvc wehe -o yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    volume.alpha.kubernetes.io/storage-class: gce
    volume.beta.kubernetes.io/storage-class: default
  creationTimestamp: 2016-11-02T02:36:28Z
  name: wehe
  namespace: wehe
  resourceVersion: "3255"
  selfLink: /api/v1/namespaces/wehe/persistentvolumeclaims/wehe
  uid: 283d1cc9-a0a5-11e6-a7c2-42010af00012
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  selector: {}
status:
  phase: Pending

There is a redundant of empty "selector: {}" to make this fail

Expected results:
PVC can be bound with dynamic provision

Additional info:

Comment 1 Wenqi He 2016-11-02 06:47:02 UTC
GCE is just an example, this could happen on all storageclass provision.

Comment 2 Jessica Forrester 2016-11-02 13:06:52 UTC
Erin/Zac can you guys determine whether this is an issue with the changes to the create PVC page or if this needs to be transferred to another team?

Comment 3 Zac Herman 2016-11-02 17:00:35 UTC
I have a fix, but I want to do a little more testing.

Comment 4 Zac Herman 2016-11-04 18:40:08 UTC
PR #822 has been opened to fix these issues

Comment 5 openshift-github-bot 2016-11-04 19:10:39 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/a6e3bf3a68da0b710b97d6312752faf5e7267fe2
Merge pull request #822 from zherman0/bug1390826

Merged by openshift-bot

Comment 6 Troy Dawson 2016-11-07 19:27:01 UTC
This has been merged into ose and is in OSE v3.4.0.23 or newer.

Comment 8 Wenqi He 2016-11-08 07:42:01 UTC
Test failed on below version:
openshift v3.4.0.23+24b1a58
kubernetes v1.4.0+776c994

$ oc describe pvc
  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  12m		5s		49	{persistentvolume-controller }			Warning		ProvisioningFailed	Failed to provision volume with StorageClass "fast": claim.Spec.Selector is not supported for dynamic provisioning on AWS

Still a "selector: {}" part to make this fail
$ oc get pvc weheui -o yaml 
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    volume.beta.kubernetes.io/storage-class: fast
  creationTimestamp: 2016-11-08T07:28:22Z
  name: weheui
  namespace: wehe
  resourceVersion: "8366"
  selfLink: /api/v1/namespaces/wehe/persistentvolumeclaims/weheui
  uid: ed8d165f-a584-11e6-8cf0-0e3d9543087e
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  selector: {}
status:
  phase: Pending

Hope this will be fixed in newer version.

Comment 9 Zac Herman 2016-11-09 22:37:05 UTC
PR #854 has been submitted.  I could not completely test dynamic provisioning but I did completely remove the extra spec selector object so hopefully that fixes the test case.

Comment 10 Erin Boyd 2016-11-10 22:53:01 UTC
QE - Please retest. Thank you.

Comment 11 Jessica Forrester 2016-11-10 23:01:26 UTC
Erin, Zac's latest PR is not merged yet, its pending him fixing some review feedback. Moving this back to assigned.

Comment 12 openshift-github-bot 2016-11-11 18:40:30 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/44484b3fa93991a6b9d5f4121eda94600ef55628
Merge pull request #854 from zherman0/bug1390826

Merged by openshift-bot

Comment 13 Troy Dawson 2016-11-14 21:26:29 UTC
This has been merged into ocp and is in OCP v3.4.0.26 or newer.

Comment 14 Wenqi He 2016-11-15 06:10:53 UTC
I have verified this on below version:
openshift v3.4.0.26+f7e109e
kubernetes v1.4.0+776c994

This issue is fixed, Thanks


Note You need to log in before you can comment on or make changes to this bug.