Bug 2263319

Summary: Replica-1 configuration fails with cephcluster spec invalid value
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Aviad Polak <apolak>
Component: ocs-operatorAssignee: Malay Kumar parida <mparida>
Status: CLOSED ERRATA QA Contact: Elad <ebenahar>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.15CC: mparida, muagarwa, odf-bz-bot
Target Milestone: ---   
Target Release: ODF 4.15.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.15.0-136 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-19 15:32:38 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 Aviad Polak 2024-02-08 10:17:42 UTC
Description of problem (please be detailed as possible and provide log
snippests):
sometimes, when trying to apply configuration:
Ceph Non Resilient Pools:
      Enable:  true
to cluster (tested on vmware and another platforms), we got following errors:
Message:               Error while reconciling: CephCluster.ceph.rook.io "ocs-storagecluster-cephcluster" is invalid: [spec.storage.storageClassDeviceSets[3].count: Invalid value: 0: spec.storage.storageClassDeviceSets[3].count in body should be greater than or equal to 1, spec.storage.storageClassDeviceSets[4].count: Invalid value: 0: spec.storage.storageClassDeviceSets[4].count in body should be greater than or equal to 1, spec.storage.storageClassDeviceSets[5].count: Invalid value: 0: spec.storage.storageClassDeviceSets[5].count in body should be greater than or equal to 1]

Version of all relevant components (if applicable):

odf-operator.v4.15.0-130.stable

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?

yes
Is there any workaround available to the best of your knowledge?

not that im aware of

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
yes, but not for every try


Steps to Reproduce:
1. setup regular odf cluster (3m, 3w, 3osd)
2. do """oc patch storagecluster ocs-storagecluster -n openshift-storage --type json --patch '[{ "op": "replace", "path": "/spec/managedResources/cephNonResilientPools/enable", "value": true }]'"""
3. 


Actual results:
storagecluster return Err state

Expected results:


Additional info:

Comment 3 Malay Kumar parida 2024-02-08 10:29:04 UTC
While defining the default for the field it should have been
kubebuilder in all small letters, but earlier it was defined as
kubeBuilder which was causing the error. As the default 1 was not being
set, 0 was being passed as the count to the cephcluster which was reporting
invalid spec error.

Comment 8 errata-xmlrpc 2024-03-19 15:32:38 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 (Important: Red Hat OpenShift Data Foundation 4.15.0 security, enhancement, & bug fix update), 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/RHSA-2024:1383