Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1902634

Summary: The compliancesuite does not trigger when there are multiple rhcos4 profiles added in scansettingbinding object
Product: OpenShift Container Platform Reporter: xiyuan
Component: Compliance OperatorAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Prashant Dhamdhere <pdhamdhe>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: josorior, mrogers, nkinder, pdhamdhe, xiyuan
Target Milestone: ---Keywords: UpcomingSprint
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1901760 Environment:
Last Closed: 2021-01-19 13:53:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1901760    
Bug Blocks:    

Comment 1 Jakub Hrozek 2020-12-03 13:45:01 UTC
The fixes were merged as part of https://github.com/openshift/compliance-operator/pull/519

Comment 3 xiyuan 2020-12-07 13:37:47 UTC
verified with 4.6.0-0.nightly-2020-12-06-095114 and compliance-operator.v0.1.22
$ oc get csv
NAME                          DISPLAY               VERSION   REPLACES   PHASE
compliance-operator.v0.1.22   Compliance Operator   0.1.22               Succeeded
$ oc get ip
NAME            CSV                           APPROVAL    APPROVED
install-6nldd   compliance-operator.v0.1.22   Automatic   true
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-12-06-095114   True        False         5h36m   Cluster version is 4.6.0-0.nightly-2020-12-06-095114
$ oc create -f - <<EOF
> apiVersion: compliance.openshift.io/v1alpha1
> kind: ScanSettingBinding
> metadata:
>   name: rhcos4
> profiles:
> - apiGroup: compliance.openshift.io/v1alpha1
>   kind: Profile
>   name: rhcos4-e8
> - apiGroup: compliance.openshift.io/v1alpha1
>   kind: Profile
>   name: rhcos4-moderate 
> - apiGroup: compliance.openshift.io/v1alpha1
>   kind: Profile
>   name: rhcos4-ncp
> settingsRef:
>   apiGroup: compliance.openshift.io/v1alpha1
>   kind: ScanSetting
>   name: default
> EOF
scansettingbinding.compliance.openshift.io/rhcos4 created
$ oc get compliancesuite
NAME     PHASE   RESULT
rhcos4   DONE    NON-COMPLIANT

Comment 4 xiyuan 2020-12-07 13:44:01 UTC
Add more detailed info for https://bugzilla.redhat.com/show_bug.cgi?id=1902634#c3:
$ oc describe compliancesuite rhcos4
...
Status:
  Phase:   DONE
  Result:  NON-COMPLIANT
  Scan Statuses:
    Name:    rhcos4-e8-worker
    Phase:   DONE
    Result:  NON-COMPLIANT
    Results Storage:
      Name:       rhcos4-e8-worker
      Namespace:  openshift-compliance
    Name:         rhcos4-e8-master
    Phase:        DONE
    Result:       NON-COMPLIANT
    Results Storage:
      Name:       rhcos4-e8-master
      Namespace:  openshift-compliance
    Name:         rhcos4-moderate-worker
    Phase:        DONE
    Result:       NON-COMPLIANT
    Results Storage:
      Name:       rhcos4-moderate-worker
      Namespace:  openshift-compliance
    Name:         rhcos4-moderate-master
    Phase:        DONE
    Result:       NON-COMPLIANT
    Results Storage:
      Name:       rhcos4-moderate-master
      Namespace:  openshift-compliance
    Name:         rhcos4-ncp-worker
    Phase:        DONE
    Result:       NON-COMPLIANT
    Results Storage:
      Name:       rhcos4-ncp-worker
      Namespace:  openshift-compliance
    Name:         rhcos4-ncp-master
    Phase:        DONE
    Result:       NON-COMPLIANT
    Results Storage:
      Name:       rhcos4-ncp-master
      Namespace:  openshift-compliance
Events:
  Type    Reason           Age                From       Message
  ----    ------           ----               ----       -------

$ oc get scansettingbindings.compliance.openshift.io
NAME     AGE
rhcos4   32m

Comment 8 errata-xmlrpc 2021-01-19 13:53:52 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.6 compliance-operator security and bug fix 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:0190