red-hat-storage / odf-operator

OpenShift Data Foundation Meta Operator
Apache License 2.0
25 stars 58 forks source link

controllers: scale down ocs-client-op csv in non-provider mode #474

Closed leelavg closed 1 month ago

leelavg commented 1 month ago

t0: odf-op w/ X.Y.Z is installed and all dependecies at same version will be installed t1: odf-op is upgraded from X.Y.Z to X.(Y+1).0 and update will happen for odf-op unless there are explicit not upgradeable conditions set t2: dependencies will first get updated from X.Y.Z to X.Y.(Z+1) if the channel has the update, now if one of the dependencies is stuck odf-op keeps trying to check for upgraded install plan which will not be created due to previous install plan for dependencies not being fulfilled.

now, odf-op always tries to scale down client-op if not in provider mode in above scenario t1 & t2 aren't strictly linear and odf-op ended up scaling down X.Y.Z version of client-op but not X.Y.(Z+1) which will never reach running state if cluster is configured as non-provider mode.

current PR makes sure that client-op csv & deployments are always scaled down for all non-provider cases.

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: leelavg Once this PR has been reviewed and has the lgtm label, please assign agarwal-mudit for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/red-hat-storage/odf-operator/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
leelavg commented 1 month ago

fix for https://bugzilla.redhat.com/show_bug.cgi?id=2311857, I tested wrt expectation and scenarios that I could think of, pls review and surface any left out paths orrefactoring efforts. thanks.

leelavg commented 1 month ago

What is a need of doing it via the deployment now.

  • I explained the reasoning of why deployment is being brought down in code comment and why only setting single CSV replicas to 0 isn't working in PR description. May I know what more info is required?
iamniting commented 1 month ago

We had a discussion over a call and we decided to close the BZ https://bugzilla.redhat.com/show_bug.cgi?id=2311857#c7