Bug 1975820

Summary: There are plugins remained after uninstall operator with multiple plugins enabled
Product: OpenShift Container Platform Reporter: Yanping Zhang <yanpzhan>
Component: Management ConsoleAssignee: ralpert
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: We were generating a patch that only removed one plugin. Consequence: Only one plugin was removed, even if there were two or more. Fix: Updated patch to remove all enabled plugins. Result: Bug is fixed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:36:33 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 Yanping Zhang 2021-06-24 13:45:32 UTC
Description of problem:
When uninstall operator with multiple plugins enabled, not all plugins are removed.

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-06-23-201305

How reproducible:
Always

Steps to Reproduce:
1.Install an operator in project and enable at least 2 plugins. My example operator has enabled plugins: prometheus-plugin1 and prometheus-plugin2.
2.Uninstall the operator.
3.Check if plugins are removed from console operator.

Actual results:
1. All plugins are set in console operator:
$ oc get consoles.operator.openshift.io cluster -o json |grep plugin
        "plugins": [
            "prometheus-plugin1",
            "prometheus-plugin2"
2.Operator is uninstalled.
3. There is still plugin remaining in console operator:
$ oc get consoles.operator.openshift.io cluster -o json |grep plugin
        "plugins": [
            "prometheus-plugin1"


Expected results:
3. All plugins enabled by the operator should be removed from console operator.

Additional info:

Comment 1 ralpert 2021-07-01 17:43:43 UTC
I haven't had a chance to look at this yet this sprint, but will take a look on Friday.

Comment 2 ralpert 2021-08-05 20:25:09 UTC
Hey @yanpzhan - Are there other steps here that you used to test this? Maybe I'm missing them, but I'm not seeing plugins on Prometheus.

I'm happy to fix this but I haven't had any luck finding an operator with two.

Comment 4 Yanping Zhang 2021-08-30 03:38:07 UTC
Checked on 4.9 cluster with payload 4.9.0-0.nightly-2021-08-29-010334.
1. Install an operator in project with 2 plugins enabled. Check the plugins are added in console operator.
$ oc get consoles.operator.openshift.io cluster -o json |grep plugin
        "plugins": [
            "prometheus-plugin1",
            "prometheus-plugin2"
2. Uninstall the operator, then check if plugins are removed from console operator.
 $ oc get consoles.operator.openshift.io cluster -o json |grep plugin
        "plugins": []
The bug is fixed.

Comment 7 errata-xmlrpc 2021-10-18 17:36:33 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.9.0 bug fix and security 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-2021:3759