Bug 1882660 - Operators in a namespace should be installed together when approve one
Summary: Operators in a namespace should be installed together when approve one
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.0
Assignee: Robb Hamilton
QA Contact: hongyan li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-25 09:49 UTC by Jian Zhang
Modified: 2021-02-24 15:22 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: A manual install plan can affect more than one operator, but the UI doesn't clearly indicate that is the case when it is true and presents the UI requesting approval. Consequence: As a result, the user can actually be approving the install plan for multiple operators, but it the UI doesn't clearly communicate that. Fix: The UI lists all operators affected by the manual approval plan. Result: The UI clearly indicates which operators will be installed with the approval of a manual install plan.
Clone Of:
Environment:
Last Closed: 2021-02-24 15:21:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 7076 0 None closed Bug 1882660: Show all operators that will be approved with manual ins… 2021-02-17 21:02:54 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:22:07 UTC

Description Jian Zhang 2020-09-25 09:49:14 UTC
Description of problem:
After I approved the "akka-cluster-operator" on the webconsole, the "3scale-community-operator.v0.5.1" was installed. Seem the screenshot: https://user-images.githubusercontent.com/15416633/94224592-6913ce80-ff25-11ea-9524-c91882d59bee.png 

Version-Release number of selected component (if applicable):
Cluster version is 4.6.0-0.nightly-2020-09-25-034954
mac:~ jianzhang$ oc -n openshift-operator-lifecycle-manager exec catalog-operator-568996d5bd-zflr9 -- olm --version
OLM version: 0.16.1
git commit: be18debfbb25ba768921373d48aa761b951eca59

How reproducible:
always

Steps to Reproduce:
1. Install OCP 4.6
2. Installed the 3scale-community-operator, akka-cluster-operator-certified with manual mode and don't approve them, And then, install the Etcd operator with Automatic mode.

mac:~ jianzhang$ oc get sub -n default
NAME                              PACKAGE                           SOURCE                CHANNEL
3scale-community-operator         3scale-community-operator         community-operators   threescale-2.8
akka-cluster-operator-certified   akka-cluster-operator-certified   certified-operators   beta
etcd                              etcd                              community-operators   singlenamespace-alpha
mac:~ jianzhang$ oc get ip -n default
NAME            CSV                                      APPROVAL   APPROVED
install-cmbtw   akka-cluster-operator-certified.v1.0.0   Manual     false
install-gtm6n   3scale-community-operator.v0.5.1         Manual     false
install-gxkvp   3scale-community-operator.v0.5.1         Manual     false


mac:~ jianzhang$ oc get ip install-cmbtw -o=jsonpath='{.spec.clusterServiceVersionNames}'
["akka-cluster-operator-certified.v1.0.0","etcdoperator.v0.9.4","3scale-community-operator.v0.5.1"]

mac:~ jianzhang$ oc get ip install-gtm6n -o=jsonpath='{.spec.clusterServiceVersionNames}'
["3scale-community-operator.v0.5.1","akka-cluster-operator-certified.v1.0.0"]

mac:~ jianzhang$ oc get ip install-gxkvp -o=jsonpath='{.spec.clusterServiceVersionNames}'
["3scale-community-operator.v0.5.1"]

3. Approve the "akka-cluster-operator" on the webconsole.

Actual results:
the "3scale-community-operator.v0.5.1" was installed too. Seem the screenshot: https://user-images.githubusercontent.com/15416633/94224592-6913ce80-ff25-11ea-9524-c91882d59bee.png 

And, the InstallPlan of the "3scale-community-operator.v0.5.1" still display APPROVED: false
mac:~ jianzhang$ oc get ip
NAME            CSV                                      APPROVAL   APPROVED
install-cmbtw   akka-cluster-operator-certified.v1.0.0   Manual     false
install-gtm6n   3scale-community-operator.v0.5.1         Manual     true
install-gxkvp   3scale-community-operator.v0.5.1         Manual     false

mac:~ jianzhang$ oc get csv -n default
NAME                                     DISPLAY                 VERSION   REPLACES                           PHASE
3scale-community-operator.v0.5.1         3scale API Management   0.5.1     3scale-community-operator.v0.4.0   Succeeded
akka-cluster-operator-certified.v1.0.0   Akka Cluster Operator   1.0.0                                        Succeeded

Expected results:
The "3scale-community-operator.v0.5.1" should not be installed.

Additional info:
I guess the root cause is that the "akka-cluster-operator"'s InstallPlan contains the "3scale-community-operator.v0.5.1"'s CSV.
mac:~ jianzhang$ oc get ip install-gtm6n -o=jsonpath='{.spec.clusterServiceVersionNames}'
["3scale-community-operator.v0.5.1","akka-cluster-operator-certified.v1.0.0"]

Comment 1 Nick Hale 2020-09-28 15:40:06 UTC
Operators resolved together in a namespace are approved and installed together. This is not a bug in OLM.

If anything, I think this may warrant a console bug or RFE to associate installplans with approval, rather than specific operators.

Comment 2 Jian Zhang 2020-09-29 02:49:32 UTC
Hi Nick,

> Operators resolved together in a namespace are approved and installed together. This is not a bug in OLM.

Yes, I understand the design. But, as you can see, only the 3scal operaor installed after approve the akka operator, the etcd operator still in pending, is it as expected? Shouldn't approve all of them together?

Besides, the installPlan of the operator still display "false" even if it had been installed: the InstallPlan of the "3scale-community-operator.v0.5.1" still display APPROVED: false. It should display true since it had been installed successfully.
mac:~ jianzhang$ oc get ip
NAME            CSV                                      APPROVAL   APPROVED
install-cmbtw   akka-cluster-operator-certified.v1.0.0   Manual     false
install-gtm6n   3scale-community-operator.v0.5.1         Manual     true
install-gxkvp   3scale-community-operator.v0.5.1         Manual     false

I reopen it, thanks!

Comment 4 Kevin Rizza 2020-10-20 18:47:18 UTC
Hey Jian,

What operators were included in the install plan that was approved? It seems likely that this was an ordering problem and the actual problem is a UX issue -- the UX where the console is approving or not approving does not properly understand the scope of install plans that resolve multiple operators. To that end, I think this issue should actually be reassigned to the console team for further review (although most likely this should be considered an RFE rather than a bug).

I also think there is a separate problem here, which is that the printer columns for install plans should not have the CSV field at all -- install plans should be resolving multiple CSVs, so the UX is confusing to include that field at all.

I'm reassigning this ticket to the console team for further review, because the underlying implementation is working as expected.

Comment 5 Robb Hamilton 2020-10-21 12:20:00 UTC
Adding Tony and Peter to the CC list for UX input.

Comment 6 tony.wu 2020-10-26 22:41:51 UTC
To level-set, what tripped the users up is about "how InstallPlan(s) associated with Operator Subscription(s)" within a namespace.


In this BZ, the user installed 3 Operators in the same namespace, by:
---
Step 1. install 3scale Operator, with “Manual Approval”
    InstallPlan A <--> 3scale Subscription
    
    --> InstallPlan pending: haven’t approved it


Step 2. install akka Operator, with “Manual Approval”
    InstallPlan B <--> akka Subscription
                  <--> 3scale Subscription

   -->  InstallPlan pending: haven’t approved it


Step 3. install etcd Operator, with “Auto Approval”
    InstallPlan C <--> etcd Subscription
                  <--> akka Subscription
                  <--> 3scale Subscription     

    --> InstallPlan pending: haven’t approved it


Step 4. Go to akka Subscription, 
     Find associated InstallPlan B,
     Approve InstallPlan B


Step 5. Since InstallPlan B associates with both akka and 3scale Subscriptions, both Operator got installed 
---


Alternatively, in step 4 of the above scenario, if the user instead:

case A). approved 3scale Operator, 
    --> since InstallPlan A is only associated with 3scale Subscription, only 3scale Operator would be installed.

case B). approved etcd Operator, 
    --> since InstallPlan C is associated with etcd, akka, and 3scale Subscriptions, all three Operators would be installed.
    
    *Side Note: Noticed that the etcd Operator was in fact installed with “Auto Approval”. There is another UI work to help convey this separately.

Comment 7 tony.wu 2020-10-26 22:49:15 UTC
Currently, Console UI actually has already shown that "InstallPlan B" (in the above scenario) includes components from both "Akka" and "3scale" Operators.

I guess what UI could potentially do more to help here is to call out more explicitly saying in those hint blocks of the InstallPlan details page:
For example (quick idea):

1). Review Manual Install Plan
"Inspect the requirements for the components ___from `Akka` and `3scale` Operators___ specified in this install plan before approving."

2). Review Manual Install Plan
"Once approved, the following resources ___from `Akka` and `3scale` Operators___ will be created in order to satisfy the requirements for the components specified in the plan. Click the resource name to view the resource in detail."

Or something even simpler that highlights the fact that "InstallPlan could be associated with more than one Subscription(s)" and approve this InstallPlan will install all the associated components for those Subscriptions.

Comment 12 hongyan li 2020-11-23 03:08:44 UTC
Test with payload 4.7.0-0.nightly-2020-11-22-123106

Console UI is enhanced, when install multiple operators in a same project, can know exactly which components are in every install plan, approve an install plan, only corresponding components are intalled

Comment 13 hongyan li 2020-11-23 03:12:00 UTC
Can inspect install plan detail from an installed operator also

Comment 16 errata-xmlrpc 2021-02-24 15:21:14 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633


Note You need to log in before you can comment on or make changes to this bug.