Bug 1931613

Summary: [RFE] [OCPonRHV] user can create more than one default storage class
Product: OpenShift Container Platform Reporter: michal <mgold>
Component: StorageAssignee: aos-storage-staff <aos-storage-staff>
Storage sub component: Kubernetes QA Contact: Qin Ping <piqin>
Status: CLOSED NOTABUG Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, dhardie, jokerman, jsafrane, lleistne, mburman, mfojtik, piqin
Version: 4.7   
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: 2021-03-10 09:43:53 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 michal 2021-02-22 19:29:57 UTC
Description of problem:
user can create more than one default storage class and when he creates pvc without define sc he got error

Version-Release number of selected component (if applicable):
version   4.7.0-0.nightly-2021-02-04-031352

How reproducible:
100%


Steps to Reproduce:
1. create 2 default Storage Class -oc create -f storageclass.yaml 
2. create pvc without define any storage class name 
  oc create -f storage-claim.yaml
Error from server (Forbidden): error when creating "storage-claim.yaml": persistentvolumeclaims "7g-ovirt-cow-disk" is forbidden: Internal error occurred: 4 default StorageClasses were found
 

Actual results:
user can create more than one default storage class and when he creates pvc without define sc he got this error: 
Internal error occurred: 4 default StorageClasses were found

Expected results:
it should not be possible to create more than one default storage class


Additional info:

Comment 1 Jan Safranek 2021-02-23 15:30:54 UTC
We've been closing these bugs as CLOSED/WONTFIX, see https://bugzilla.redhat.com/show_bug.cgi?id=1464606, because of concurrency issues. Now that we have validating webhooks as GA, we can implement a more stable solution. But it's technically a RFE.

Comment 2 Jan Safranek 2021-02-23 16:21:10 UTC
Michal, do you have a customer that requires this feature? A ticket + (short) business justification would help.

Comment 3 michal 2021-02-23 18:52:40 UTC
Hi Jan, actually I don't have a ticket. 
I just run this test regarding the documentation:
https://deploy-preview-29269--osdocs.netlify.app/openshift-enterprise/latest/storage/container_storage_interface/persistent-storage-csi-ovirt.html
it mentions there that user can create only one default storage domain.

Comment 5 Duncan Hardie 2021-03-10 09:41:38 UTC
Moved this over to an Epic on the storage board (https://issues.redhat.com/browse/STOR-545), will close this bug as a result