Bug 1834335

Summary: Storage class selection should not replace storage class name
Product: OpenShift Container Platform Reporter: Afreen <afrahman>
Component: Console Storage PluginAssignee: Afreen <afrahman>
Status: CLOSED ERRATA QA Contact: Itzhak <ikave>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, ebenahar, nthomas
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:37:32 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:
Attachments:
Description Flags
storage claster yaml before adding the new SC
none
Storage cluster yaml after adding the new SC
none
ocs device set after adding capacity with SC 'test' instead of 'gp2' none

Description Afreen 2020-05-11 14:18:42 UTC
Description of problem:
Storage class selection should not replace storage class name

Version-Release number of selected component (if applicable):
OCP 4.5

How reproducible:
Install OCS and create a storage cluster

Steps to Reproduce:
1. Go to Storage cluster instance page
2. Click on add capacity kebab action
3. Choose a storage class different from the storage class used at installation
4. Click on add capacity

Actual results:
The CR gets updated with the chosen storage class name in existing device set

Expected results:
The CR should not be updated with the chosen storage class name in existing device set

Additional info:
In 4.6 , a new device set will be added for different storage class selection.
In 4.5 , we must avoid sending selected storage class name.

Comment 3 Itzhak 2020-05-26 14:41:10 UTC
To verify the bug I did the following steps:

1. Create a new SC called 'test' from the UI uses PROVISIONER 'kubernetes.io/aws-ebs'.
2. Go to Storage cluster instance page.
3. Click on add capacity action and in the SC dropdown menu choose the 'test' option. 
4. Click on the add capacity button.
5. Verify that in the storage cluster yaml we have this var: 'storageClassName: gp2', 
and also verify that in the ocs-deviceset we have the 'STORAGECLASS' value is 'gp2'.

Comment 4 Itzhak 2020-05-26 14:45:08 UTC
Created attachment 1692297 [details]
storage claster yaml before adding the new SC

Comment 5 Itzhak 2020-05-26 14:47:03 UTC
Created attachment 1692298 [details]
Storage cluster yaml after adding the new SC

Comment 6 Itzhak 2020-05-26 14:49:09 UTC
Created attachment 1692299 [details]
ocs device set after adding capacity with SC 'test' instead of 'gp2'

Comment 7 Itzhak 2020-05-26 15:19:08 UTC
I added here additional information about the cluster I used the test the bug: 

$oc version:
Client Version: 4.3.8
Server Version: 4.5.0-0.nightly-2020-05-26-021358
Kubernetes Version: v1.18.2

$oc get csv -n openshift-storage:
NAME                         DISPLAY                       VERSION        REPLACES              PHASE
awss3operator.1.0.1          AWS S3 Operator               1.0.1          awss3operator.1.0.0   Succeeded
ocs-operator.v4.5.0-435.ci   OpenShift Container Storage   4.5.0-435.ci                         Succeeded

Rook version:
rook: 4.5-15.741ed813.release_4.5
go: go1.13.4

Ceph version:
ceph version 14.2.8-56.el8cp (8d24dfe40524f948afd782e14dc63a0d0cacb28b) nautilus (stable)

Rook operator image version:
          containerImage: quay.io/ocs-dev/ocs-operator:4.5.0
    Image:          quay.io/rhceph-dev/mcg-operator@sha256:6330e626076b44b468628d86ae561d2ebb41f5646964e578dfb4ceed6d6d6209
    Image ID:       quay.io/rhceph-dev/mcg-operator@sha256:6330e626076b44b468628d86ae561d2ebb41f5646964e578dfb4ceed6d6d6209
              containerImage: quay.io/ocs-dev/ocs-operator:4.5.0
    Image:         quay.io/rhceph-dev/ocs-operator@sha256:91268c88ebcfbd2c4c8311bb04b41d2886972cb21dcf7d3de1db69952d4deef4
    Image ID:      quay.io/rhceph-dev/ocs-operator@sha256:91268c88ebcfbd2c4c8311bb04b41d2886972cb21dcf7d3de1db69952d4deef4
              containerImage: quay.io/ocs-dev/ocs-operator:4.5.0
    Image:         quay.io/rhceph-dev/rook-ceph@sha256:43ae460a21bf2b801c37a5bbfc2184c79eeb320b808e526eaab8d64bd830a0d4
    Image ID:      quay.io/rhceph-dev/rook-ceph@sha256:43ae460a21bf2b801c37a5bbfc2184c79eeb320b808e526eaab8d64bd830a0d4

Ceph image version:
Image:         quay.io/rhceph-dev/rhceph@sha256:b4c186945e3d123a23926514fdc31740d8e2b3b43592b943a1635a209cd42f2e
    Image ID:      quay.io/rhceph-dev/rhceph@sha256:b4c186945e3d123a23926514fdc31740d8e2b3b43592b943a1635a209cd42f2e
    Image:         quay.io/rhceph-dev/rhceph@sha256:b4c186945e3d123a23926514fdc31740d8e2b3b43592b943a1635a209cd42f2e
    Image ID:      quay.io/rhceph-dev/rhceph@sha256:b4c186945e3d123a23926514fdc31740d8e2b3b43592b943a1635a209cd42f2e
    Image:         quay.io/rhceph-dev/rhceph@sha256:b4c186945e3d123a23926514fdc31740d8e2b3b43592b943a1635a209cd42f2e
    Image ID:      quay.io/rhceph-dev/rhceph@sha256:b4c186945e3d123a23926514fdc31740d8e2b3b43592b943a1635a209cd42f2e

Comment 8 errata-xmlrpc 2020-07-13 17:37:32 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-2020:2409