Bug 1408260 - undefined method `oscap_cleanup' error when running SmartState Analysis on containerized ManageIQ
Summary: undefined method `oscap_cleanup' error when running SmartState Analysis on co...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.1
Assignee: Barak
QA Contact: Dave Johnson
URL:
Whiteboard: container
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-22 15:57 UTC by Pavel Zagalsky
Modified: 2019-08-06 20:03 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-12 10:36:43 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Zagalsky 2016-12-22 15:57:58 UTC
Description of problem:
SSA fails with undefined method `oscap_cleanup' error when running on Containerized ManageIQ from euwe_combined_fixes branch

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

How reproducible:
Always

Steps to Reproduce:
1. Select an image 
2. Perform an SSA scan
3.

Actual results:
The scan fails with the following error:
job timed out after 335.890864167 seconds of inactivity.  Inactivity threshold [300 seconds]

The following appears in log:

[----] E, [2016-12-22T15:50:17.306408 #609:3feec41a113c] ERROR -- : Q-task_id([2a25c6f8-c85e-11e6-accf-0242ac110002]) MIQ(MiqQueue#deliver) Message id: [2187], Error: [undefined method `oscap_cleanup' for OpenSCAP:Module]
[----] E, [2016-12-22T15:50:17.306643 #609:3feec41a113c] ERROR -- : Q-task_id([2a25c6f8-c85e-11e6-accf-0242ac110002]) [NoMethodError]: undefined method `oscap_cleanup' for OpenSCAP:Module  Method:[rescue in deliver]
[----] E, [2016-12-22T15:50:17.306748 #609:3feec41a113c] ERROR -- : Q-task_id([2a25c6f8-c85e-11e6-accf-0242ac110002]) /var/www/miq/vmdb/app/models/openscap_result.rb:61:in `ensure in with_openscap_arf'


Expected results:


Additional info:

Comment 2 Mooli Tayer 2016-12-25 11:43:50 UTC
seems like we need to do two things:
- Add the openscap-scanner binary to the container like it was added to the appliance[1]
- Fix the bug in our code[2] to a proper if statement that avoids the openscap code altogether if the binary is not available

[1] https://github.com/ManageIQ/manageiq-appliance-build/pull/116/files
[2] https://github.com/ManageIQ/manageiq/blob/master/app/models/openscap_result.rb#L53


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