Bug 1448323 - [RFE] Add detailed error reporting when SmartState Analysis is failing
Summary: [RFE] Add detailed error reporting when SmartState Analysis is failing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: All
OS: Linux
high
high
Target Milestone: GA
: 5.9.0
Assignee: Erez Freiberger
QA Contact: brahmani
URL:
Whiteboard: container
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-05 08:13 UTC by Christian Jung
Modified: 2018-04-09 12:36 UTC (History)
11 users (show)

Fixed In Version: 5.9.0.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-01 13:12:04 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 0 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 18:37:12 UTC

Description Christian Jung 2017-05-05 08:13:03 UTC
Description of problem:
Right now OpenSCAP in OpenShift only works for RHEL based container images (because it fails to download policies, if the image is anything else but RHEL).

This should be handled more user friendly. There should be some indication in the UI saying "OpenSCAP analysis skipped due to unsupported container image format" or something like that.

Right now it tries to perform the scan, but fails. The error is not presented in a user friendly way either. (I only found out by looking into the OpenShift logs).

Additional information:
Obviously, the best possible solution would be to be able to run OpenSCAP on any OS, but that's probably never going to happen.

The user should still be able to perform a SSA task, but the OpenSCAP task should be skipped and the reason should be presented in the UI.

Comment 2 Mooli Tayer 2017-05-07 09:44:15 UTC
Erez I remember you recently updated on some plans for scanning non rhel images.
Can you update on the status please? 

BTW if you need URLs for other distribution contents I think I have those somewhere

Comment 3 Erez Freiberger 2017-05-07 09:52:37 UTC
Mooli,
It was pointed to me that the way I wanted to scan CentOS images might not work, I am open for more suggestions.

I am not sure that disabling OpenSCAP scanning is a good choice. For non RHEL images there won't be any difference for the ManageIQ user (there still won't be any openscap results). But this will add complications for situations where it is hard to know the image's OS before initiating the scan (For example for images that are discovered through running pods)

Comment 4 Federico Simoncelli 2017-05-18 09:25:24 UTC
Erez according to the PR:

https://github.com/openshift/image-inspector/pull/40

There is no CVE content for CentOS images that can be used.

For CentOS and other distributions (Debian, etc.) it should be clear that OpenSCAP cannot run and return a meaningful error in CloudForms (e.g. "Image distribution not supported for OpenSCAP scan").

Comment 5 Federico Simoncelli 2017-08-22 15:54:48 UTC
Erez, I think we should improve the error reporting regardless of what distributions are supported.

Do you have any dependency on image-inspector or do you have enough information to improve the error reporting on the ManageIQ side?

Comment 6 Erez Freiberger 2017-08-22 17:20:07 UTC
All the data needed is already available from the /api/v1/metadata endpoint. I will take care of this ASAP

Comment 9 Federico Simoncelli 2017-10-03 07:30:31 UTC
Changing to RFE as this adds a new feature in Core ManageIQ:

https://github.com/ManageIQ/manageiq-schema/pull/57

Moving to 5.9 because it needs a schema change.

Comment 10 Erez Freiberger 2017-10-23 09:17:39 UTC
The Patch to fix this issue, https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/100 is dependent on https://github.com/ManageIQ/manageiq/pull/15967 to add the required model.

Comment 11 brahmani 2017-11-16 12:26:47 UTC
Verify on 5.9.0.8:
Create Pod from Non RHEL image : docker.io/openshift/image-policy-check:latest
perform SSA to image openshift/image-policy-check ,
On Tasks view get error message : 
"Unable to run OpenSCAP: Unable to get RHEL distribution number: could not find RHEL dist"

Comment 14 errata-xmlrpc 2018-03-01 13:12:04 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, 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-2018:0380


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