Bug 2113991 - When debug is setting to true, the pod generated by ComplianceSuite won’t get deleted when the ComplianceSuite get deleted
Summary: When debug is setting to true, the pod generated by ComplianceSuite won’t get...
Keywords:
Status: CLOSED DUPLICATE of bug 2092913
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Compliance Operator
Version: 4.11
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jakub Hrozek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-02 13:56 UTC by Varad Ahirwadkar
Modified: 2022-08-02 15:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-02 15:03:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Varad Ahirwadkar 2022-08-02 13:56:51 UTC
Description of problem:
Pods generated by ComplianceSuite not getting deleted automatically after deleting ComplianceSuite resource with debug: true

Version-Release number of selected component (if applicable):
compliance-operator.v0.1.53
OCP release: 4.11.0-rc.6
Architecture: ppc64le

How reproducible:
Everytime

Steps to Reproduce:
1. Install Compliance Operator

2. Create ComplianceSuite

# oc create -f - <<EOF
apiVersion: compliance.openshift.io/v1alpha1
kind: ComplianceSuite
metadata:
  name: example-compliancesuite
spec:
  scans:
    - name: rhcos-scan
      profile: xccdf_org.ssgproject.content_profile_moderate
      content: ssg-rhcos4-ds.xml
      contentImage: quay.io/complianceascode/ocp4:latest
      rule: "xccdf_org.ssgproject.content_rule_no_netrc_files"
      debug: true
      scanTolerations:
        - effect: NoSchedule
          key: key1
          value: value1
          operator: Equal
      nodeSelector:
        node-role.kubernetes.io/worker: ""
EOF
compliancesuite.compliance.openshift.io/example-compliancesuite created

# oc get pods
NAME                                                          READY   STATUS      RESTARTS      AGE
aggregator-pod-rhcos-scan                                     0/1     Completed   0             2m40s
compliance-operator-6699bb9bb7-nlc7p                          1/1     Running     1 (63m ago)   64m
ocp4-openshift-compliance-pp-55647cf5d7-bpl6n                 1/1     Running     0             62m
rhcos-scan-tor01-worker-0.rdr-varad-ocp-410-upi.ibm.com-pod   0/2     Completed   0             4m30s
rhcos-scan-tor01-worker-1.rdr-varad-ocp-410-upi.ibm.com-pod   0/2     Completed   0             4m30s
rhcos-scan-tor01-worker-2.rdr-varad-ocp-410-upi.ibm.com-pod   0/2     Completed   0             4m30s
rhcos4-openshift-compliance-pp-598cc46495-zb6mj               1/1     Running     0             62m

3. Delete the compliancesuite
# oc delete compliancesuite example-compliancesuite
compliancesuite.compliance.openshift.io "example-compliancesuite" deleted


Actual results:
The pods generated by ComplianceSuite example-compliancesuite won’t be deleted when the ComplianceSuite example-compliancesuite get deleted

# oc get pods
NAME                                                          READY   STATUS      RESTARTS      AGE
aggregator-pod-rhcos-scan                                     0/1     Completed   0             7m19s
compliance-operator-6699bb9bb7-nlc7p                          1/1     Running     1 (68m ago)   69m
ocp4-openshift-compliance-pp-55647cf5d7-bpl6n                 1/1     Running     0             67m
rhcos-scan-tor01-worker-0.rdr-varad-ocp-410-upi.ibm.com-pod   0/2     Completed   0             9m9s
rhcos-scan-tor01-worker-1.rdr-varad-ocp-410-upi.ibm.com-pod   0/2     Completed   0             9m9s
rhcos-scan-tor01-worker-2.rdr-varad-ocp-410-upi.ibm.com-pod   0/2     Completed   0             9m9s
rhcos4-openshift-compliance-pp-598cc46495-zb6mj               1/1     Running     0             67m



Expected results:
All pods generated by compliance suite should be deleted when the compliancesuite example-compliancesuite get deleted

Additional info:
Must gather logs: https://drive.google.com/file/d/1hJ5_3rZr3Vma94Nf9bF8EkgKhriq4fi_/view?usp=sharing

Comment 1 Jakub Hrozek 2022-08-02 15:03:47 UTC

*** This bug has been marked as a duplicate of bug 2092913 ***


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