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

Bug 1860791

Summary: [OCP v4.6] The ComplianceSuite shows empty status over OLM (UI) after the scan complete
Product: OpenShift Container Platform Reporter: Prashant Dhamdhere <pdhamdhe>
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, ocasalsa, xiyuan
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:17:14 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:
Attachments:
Description Flags
ComplianceSuite shows empty status
none
Csuite-launching
none
Csuite-aggregating
none
Csuite-done none

Description Prashant Dhamdhere 2020-07-27 07:07:26 UTC
Created attachment 1702478 [details]
ComplianceSuite shows empty status

Description of problem:

The ComplianceSuite shows empty status over OLM (UI) after the scan complete. 
However, the ComplianceScan shows the status `Phase: DONE`. Attaching 
'ComplianceSuite UI-2020-07-27 11-18-27.png' screenshot for more detail.

Version-Release number of selected component (if applicable):

4.6.0-0.nightly-2020-07-25-091217 

How reproducible:

Always 

Steps to Reproduce:

1. clone git repo  
$ git clone https://github.com/openshift/compliance-operator.git  

2. Create openshift-compliance namespace 
$ oc create namepsace openshift-compliance 

3. Deploy operator-source  
$ oc create -f compliance-operator/deploy/olm-catalog/operator-source.yaml 

4. Deploy Compliance-Operator through OLM 


Actual results:

The ComplianceSuite shows empty status over OLM (UI) after the scan complete.  

Expected results:

The ComplianceSuite should show some status like the ComplianceScan shows the 
status `Phase: DONE` once the scan complete.

Additional info:

On CLI, these resources show the proper status however, on UI the status of the 
ComplianceSuite show empty. Attaching 'ComplianceSuite UI-2020-07-27 11-18-27.png' 
screenshot for more detail.

$ oc get compliancescan 
NAME           PHASE   RESULT 
workers-scan   DONE    NON-COMPLIANT 

$ oc get compliancesuite 
NAME                      PHASE   RESULT 
example-compliancesuite   DONE    NON-COMPLIANT

Comment 2 Jakub Hrozek 2020-08-18 12:09:45 UTC
I started looking into this, so far I was able to reproduce the behaviour and I asked for pointers on #forum-ui. btw the empty columns are not displayed only for Scans, but also for CheckResults etc. It looks like the console is not really honoring the `additionalPrinterColumns` the CRDs specify. I'll update the bug again once I have some reply about how is the UI rendered.

Comment 5 Jakub Hrozek 2020-08-18 16:22:28 UTC
So, we could fix the complianceSuite status by switching the field name from .status.aggregatedPhase to .status.Phase. But the other CRs would still show nothing. Unsure if it's worth it.

Long-term I guess implementing a console plugin is a more systematic way.

Matt, Ozz, what do you think?

Comment 6 Jakub Hrozek 2020-08-18 19:26:52 UTC
WIP PR: https://github.com/openshift/compliance-operator/pull/405

Comment 7 Jakub Hrozek 2020-08-19 13:51:57 UTC
https://github.com/openshift/compliance-operator/pull/405 updated to be non-WIP. Note that the patch only fixes Suites, not e.g. Remediations or Checks

Comment 11 Prashant Dhamdhere 2020-09-08 09:37:01 UTC
This looks good now, The ComplianceSuite shows proper status over OLM (UI) during & after the scan complete.

Attaching some screenshots (Csuite-launching-2020-09-08 11-57-29.png, Csuite-aggregating-2020-09-08 12-01-14.png,
csuite-done- 2020-09-08 12-02-21.png)

Verified on: 4.6.0-0.nightly-2020-09-07-224533

$ oc get compliancesuite
NAME                      PHASE   RESULT
example-compliancesuite   DONE    NON-COMPLIANT

$ oc get compliancescan
NAME            PHASE   RESULT
platform-scan   DONE    NON-COMPLIANT
workers-scan    DONE    NON-COMPLIANT

Comment 12 Prashant Dhamdhere 2020-09-08 09:39:28 UTC
Created attachment 1714056 [details]
Csuite-launching

Comment 13 Prashant Dhamdhere 2020-09-08 09:40:42 UTC
Created attachment 1714059 [details]
Csuite-aggregating

Comment 14 Prashant Dhamdhere 2020-09-08 09:41:12 UTC
Created attachment 1714061 [details]
Csuite-done

Comment 16 errata-xmlrpc 2020-10-27 16:17: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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196

Comment 17 errata-xmlrpc 2020-10-27 16:20:50 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196