Bug 1500645

Summary: [ded-stage-aws]Can't bound pvc to volume due to 'Internal error occurred: 2 default StorageClasses were found'
Product: OpenShift Online Reporter: XiuJuan Wang <xiuwang>
Component: StorageAssignee: Jan Safranek <jsafrane>
Status: CLOSED DUPLICATE QA Contact: Jianwei Hou <jhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, aos-storage-staff, jsafrane
Target Milestone: ---   
Target Release: ---   
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: 2017-10-17 15:03:29 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 XiuJuan Wang 2017-10-11 09:06:42 UTC
Description of problem:
Can't bound pvc to volume due to 'Internal error occurred: 2 default StorageClasses were found'

Version-Release number of selected component (if applicable):
Server https://api.ded-stage-aws.openshift.com:443
openshift v3.6.173.0.21
kubernetes v1.6.1+5115d708d7

How reproducible:
always

Steps to Reproduce:
1.Create a persistent app
oc new-app dancer-mysql-persistent
2.
3.

Actual results:

--> Creating resources ...
          secret "dancer-mysql-persistent" created
          service "dancer-mysql-persistent" created
          route "dancer-mysql-persistent" created
          imagestream "dancer-mysql-persistent" created
          buildconfig "dancer-mysql-persistent" created
          deploymentconfig "dancer-mysql-persistent" created
          error: persistentvolumeclaims "database" is forbidden: Internal error occurred: 2 default StorageClasses were found
          service "database" created
          deploymentconfig "database" created
      --> Failed


Expected results:
Should bound pvc successfully

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

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

 oc get storageclass
NAME            TYPE
ebs (default)   kubernetes.io/aws-ebs
gp2 (default)   kubernetes.io/aws-ebs

Additional info:

Comment 1 Jan Safranek 2017-10-17 13:41:18 UTC
This has been fixed in https://github.com/openshift/ose/pull/876

Comment 2 Jan Safranek 2017-10-17 15:03:29 UTC
Sorry, disregard the previous comment, this bug has not been fixed.

The error you see is expected when two or mode default storage classes exist. User is supposed to go to OpenShift admin and request a fix (i.e. admin must make sure that only one default storage class exists).

There is ongoing effort in https://bugzilla.redhat.com/show_bug.cgi?id=1464606 to prevent admin from creating multiple default storage classes, but that's harder than it seems.

*** This bug has been marked as a duplicate of bug 1464606 ***