Description of problem: The profile parser pod deployment and associated profiles should get removed after upgrade the compliance operator to latest version Version-Release number of selected component (if applicable): 4.6.9 How reproducible: Always Steps to Reproduce: 1. on stage cluster, install a compliance operator: $oc create -f - <<EOF apiVersion: v1 kind: Namespace metadata: name: up annotations: openshift.io/node-selector: "" EOF $ oc create -f - <<EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: openshift-compliance-abcd namespace: up spec: targetNamespaces: - up EOF $ oc create -f - <<EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: openshift-compliance-operator namespace: up spec: channel: "4.6" Approval: Manual name: compliance-operator source: redhat-operators sourceNamespace: openshift-marketplace EOF $ oc get ip NAME CSV APPROVAL APPROVED install-xbqh7 compliance-operator.v0.1.17 Automatic true $ oc get csv -w NAME DISPLAY VERSION REPLACES PHASE compliance-operator.v0.1.17 Compliance Operator 0.1.17 Succeeded elasticsearch-operator.4.6.0-202012050130.p0 Elasticsearch Operator 4.6.0-202012050130.p0 Succeeded 2. patch source in subscriptions which will have stage index image with latest version of operator: $ oc patch subscriptions openshift-compliance-operator -p '{"spec":{"source":"qe-app-registry"}}' --type='merge' 3. check the ip and csv to makre sure operator upgrade finished: $ oc get ip NAME CSV APPROVAL APPROVED install-cx59m compliance-operator.v0.1.22 Automatic true install-xbqh7 compliance-operator.v0.1.17 Automatic true $ oc get csv NAME DISPLAY VERSION REPLACES PHASE compliance-operator.v0.1.22 Compliance Operator 0.1.22 compliance-operator.v0.1.17 Succeeded elasticsearch-operator.4.6.0-202012050130.p0 Elasticsearch Operator 4.6.0-202012050130.p0 Succeeded Actual results: The profile parser pod deployment and associated profiles does not get removed after upgrade the compliance operator to latest version ############Before upgrade, there are deployments for profiles: oc get deployment NAME READY UP-TO-DATE AVAILABLE AGE compliance-operator 1/1 1 1 5m ocp4-pp 1/1 1 1 4m rhcos4-pp 1/1 1 1 4m ############After upgrade, there are two new deployments for profile parser: $ oc get deployment NAME READY UP-TO-DATE AVAILABLE AGE compliance-operator 1/1 1 1 15m ocp4-pp 1/1 1 1 14m ocp4-up-pp 1/1 1 1 3m43s rhcos4-pp 1/1 1 1 14m rhcos4-up-pp 1/1 1 1 3m43s $ oc get pod NAME READY STATUS RESTARTS AGE compliance-operator-84c495768b-zsgqb 1/1 Running 0 4m36s ocp4-pp-5bbc8cb8db-4xdkg 1/1 Running 0 14m ocp4-up-pp-bb856cb95-8n6sd 1/1 Running 0 3m37s rhcos4-pp-6f5fdfbdb-wqwxv 1/1 Running 0 14m rhcos4-up-pp-f84f7559-m7vfh 1/1 Running 0 3m37s $ oc get profile.compliance NAME AGE ocp4-cis 18m ocp4-cis-node 18m ocp4-e8 18m ocp4-moderate 18m ocp4-ncp 18m rhcos4-e8 17m rhcos4-moderate 17m rhcos4-ncp 17m $ oc delete deployment ocp4-pp rhcos4-pp deployment.apps "ocp4-pp" deleted deployment.apps "rhcos4-pp" deleted $ oc get pod NAME READY STATUS RESTARTS AGE compliance-operator-84c495768b-zsgqb 1/1 Running 0 9m31s ocp4-up-pp-bb856cb95-8n6sd 1/1 Running 0 8m32s rhcos4-up-pp-f84f7559-m7vfh 1/1 Running 0 8m32s Expected results The profile parser pod deployment and associated profiles should get removed after upgrade the compliance operator to latest version Additional info Delete deployment manually doesn't work. The ocp profiles still exist. $ oc get profile.compliance NAME AGE ocp4-cis 18m ocp4-cis-node 18m ocp4-e8 18m ocp4-moderate 18m ocp4-ncp 18m rhcos4-e8 18m rhcos4-moderate 18m rhcos4-ncp 18m
new bundle image needed to verify this bug.
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.7 compliance-operator image 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/RHBA-2021:0435