Bug 1450762

Summary: Storageclass created with annotation "storageclass.kubernetes.io/is-default-class" set to true does not make storageclass as default.
Product: OpenShift Container Platform Reporter: Liang Xia <lxia>
Component: StorageAssignee: Jan Safranek <jsafrane>
Status: CLOSED ERRATA QA Contact: Liang Xia <lxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, bchilds, smunilla
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-08-10 05:24:06 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 Liang Xia 2017-05-15 07:05:19 UTC
Description of problem:
Storageclass created with annotation "storageclass.kubernetes.io/is-default-class" set to true does not make storageclass as default.

Version-Release number of selected component (if applicable):
openshift v3.6.74
kubernetes v1.6.1+5115d708d7
etcd 3.1.0

How reproducible:
Always

Steps to Reproduce:
1.Create a storageclass with below content.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: slow1
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/manual

2.Check above storageclass
oc describe storageclass

Actual results:
Name:        slow1
IsDefaultClass:    No
Annotations:    storageclass.kubernetes.io/is-default-class=true
Provisioner:    kubernetes.io/manual
Parameters:    <none>
Events:        <none>

Expected results:
The storageclass should be set as default storageclass.

Additional info:
Annotation "storageclass.beta.kubernetes.io/is-default-class" can set storageclass as default or non-default base on given value.

      Name:        sc1-5dnar
      IsDefaultClass:    No
      Annotations:    storageclass.beta.kubernetes.io/is-default-class=false
      Provisioner:    kubernetes.io/manual
      Parameters:    <none>
      Events:        <none>
      
      Name:        sc2-5dnar
      IsDefaultClass:    Yes
      Annotations:    storageclass.beta.kubernetes.io/is-default-class=true
      Provisioner:    kubernetes.io/manual
      Parameters:    <none>
      Events:        <none>
      
      Name:        sc3-5dnar
      IsDefaultClass:    No
      Annotations:    storageclass.kubernetes.io/is-default-class=false
      Provisioner:    kubernetes.io/manual
      Parameters:    <none>
      Events:        <none>
      
      Name:        sc4-5dnar
      IsDefaultClass:    No
      Annotations:    storageclass.kubernetes.io/is-default-class=true
      Provisioner:    kubernetes.io/manual
      Parameters:    <none>
      Events:        <none>

Comment 1 Jan Safranek 2017-05-31 16:23:42 UTC
https://github.com/kubernetes/kubernetes/pull/43945 is missing is OSE

Comment 2 Jan Safranek 2017-05-31 16:24:24 UTC
... *in* OSE. Backport will follow shortly.

Comment 3 Jan Safranek 2017-05-31 16:53:10 UTC
Pushed upstream: https://github.com/openshift/origin/pull/14427

Comment 6 Liang Xia 2017-06-15 06:27:51 UTC
Verified on openshift v3.6.106, the issue has fixed.

      Name:		sc1-60gxr
      IsDefaultClass:	No
      Annotations:	storageclass.beta.kubernetes.io/is-default-class=false
      Provisioner:	kubernetes.io/manual
      Parameters:	<none>
      Events:		<none>
      
      
      Name:		sc2-60gxr
      IsDefaultClass:	Yes
      Annotations:	storageclass.beta.kubernetes.io/is-default-class=true
      Provisioner:	kubernetes.io/manual
      Parameters:	<none>
      Events:		<none>
      
      
      Name:		sc3-60gxr
      IsDefaultClass:	No
      Annotations:	storageclass.kubernetes.io/is-default-class=false
      Provisioner:	kubernetes.io/manual
      Parameters:	<none>
      Events:		<none>
      
      
      Name:		sc4-60gxr
      IsDefaultClass:	Yes
      Annotations:	storageclass.kubernetes.io/is-default-class=true
      Provisioner:	kubernetes.io/manual
      Parameters:	<none>
      Events:		<none>

Comment 8 errata-xmlrpc 2017-08-10 05:24:06 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