Bug 1846389

Summary: Implement No LabelSelector for Independent mode Install in OCS 4.5
Product: OpenShift Container Platform Reporter: Neha Berry <nberry>
Component: Console Storage PluginAssignee: Ankush Behl <anbehl>
Status: CLOSED ERRATA QA Contact: Neha Berry <nberry>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: afrahman, anbehl, aos-bugs, jstrunk, madam, nthomas, ocs-bugs, sabose, sostapov
Target Milestone: ---   
Target Release: 4.6.0   
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: 2020-10-27 16:06:37 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:
Bug Depends On:    
Bug Blocks: 1849695    

Description Neha Berry 2020-06-11 13:33:25 UTC
Description of problem (please be detailed as possible and provide log
snippests):
----------------------------------------------------------------------
Currently, while Installing OCS in Independent mode, one has to label the node with OCS label manually, to make sure that the CSI and noobaa pods come up in Running state.

Moreover, unlike Converged mode(where the labels are added by default during Storagecluster CR creation), we should not need this OCS label in Indepndent mode.

There has been a proposal to remove this workaround and is fixed upstream - https://github.com/openshift/ocs-operator/pull/557

We need this fix to be backported to OCS 4.5 to resolve this manual workaround of labelling nodes.

This BZ is raised to track the fix for No LabelSelector in OCS independent mode with the PR above after a discussion in Console meeting.


Version of all relevant components (if applicable):
----------------------------------------------------------------------

OCP =4.5.0-0.nightly-2020-06-03-215545
OCS = ocs-operator.v4.5.0-446.ci
Ceph version in RHCS external cluster = ceph version 14.2.8-59.el8cp (53387608e81e6aa2487c952a604db06faa5b2cd0) nautilus (stable)
 

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
----------------------------------------------------------------------
We need to use the manual workaround

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

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

Can this issue reproducible?
----------------------------------------------------------------------
Yes

Can this issue reproduce from the UI?
----------------------------------------------------------------------
Yes

If this is a regression, please provide more details to justify this:
----------------------------------------------------------------------
No. It is a new change for Independent Mode
Steps to Reproduce:
----------------------------------------------------------------------
1. Working OCP cluster with one or more worker nodes.
2. Install or use an RHCS cluster for external mode
3. Ensure that the worker nodes for OCS are labelled using cluster.ocs.openshift.io/openshift-storage: “” <<-- this workaround should not be needed after the fix
4. Install Sroragecluster by selecting the Independent mode option. 
5. make sure that all the CSI, noobaa pods are UP without the need to label the OCP Worker nodes(after the fix) 


Actual results:
----------------------------------------------------------------------
With current OCS 4.5 builds, we have to label the Worker nodes with OCS label to bring up Noobaa and CSI pods

Expected results:
----------------------------------------------------------------------
empty labelSelector can be used, i.e. for independent mode install, one doesnt need to label the W nodes before starting with StorageClusterCR creation

In converged mode: The nodes are labelled by default as part of StorageCluster creation.

Additional info:
----------------------------------------------------------------------

Comment 4 Anubhav 2020-06-18 06:45:59 UTC
I verified the behavior of noobaa-db pod after the PR https://github.com/openshift/ocs-operator/pull/557 got merged. There was an issue also raised by Ankush on this: https://github.com/openshift/ocs-operator/issues/553
The behaviour being verified and was closed by Ankush. 
From my perspective, I think the issue might be due to this: https://github.com/openshift/ocs-operator/issues/552

Comment 5 Ankush Behl 2020-06-18 12:28:22 UTC
Looks like this is UI Issue we need to add the empty labelSelector as talked in the storageCluster CR of external mode.

spec:
  labelSelector:
    matchExpressoins: []

Comment 8 Ankush Behl 2020-06-18 15:02:51 UTC
Will backport it to 4.5 the OCP bot automatically will create a bug when I cherrypick my PR.

Comment 16 Michael Adam 2020-07-07 21:55:27 UTC
I am not entirely sure how this can have been VERIFIED, since there seems to be a crash when using the no-labelselector pattern

> spec:
>   labelSelector:
>     matchExpressoins: []


https://bugzilla.redhat.com/show_bug.cgi?id=1854651

Comment 17 Anubhav 2020-07-08 05:25:13 UTC
PR to fix this has been raised https://github.com/openshift/ocs-operator/pull/618

Comment 21 errata-xmlrpc 2020-10-27 16:06:37 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 (OpenShift Container Platform 4.6 GA Images), 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:4196