Bug 1313805

Summary: Uploading results while running 'foreman_scap_client policy_id' fails on the client
Product: Red Hat Satellite Reporter: Kedar Bidarkar <kbidarka>
Component: UncategorizedAssignee: Shlomi Zadok <szadok>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, bkearney, ehelms, kbidarka, mhulan, mmccune, oprazak, szadok, xdmoon
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14621
Whiteboard:
Fixed In Version: foreman-installer-1.11.0.1-1,rubygem-smart_proxy_openscap-0.5.3.3-1,rubygem-smart_proxy_openscap-0.5.3.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:22:30 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:
Bug Depends On:    
Bug Blocks: 1115190    
Attachments:
Description Flags
unable to upload reports none

Description Kedar Bidarkar 2016-03-02 11:45:45 UTC
Description of problem:
Uploading results while running 'foreman_scap_client policy_id' fails on the client 

~]# foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_common --results-arf /tmp/d20160302-23771-1bw0t40/results.xml /var/lib/openscap/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d.xml
DEBUG: running: /usr/bin/bzip2 /tmp/d20160302-23771-1bw0t40/results.xml
Uploading results to https://test.redhat.com:9090/compliance/arf/1
<!DOCTYPE html>
<html>
<head>
  <style type="text/css">
  body { text-align:center;font-family:helvetica,arial;font-size:22px;
    color:#888;margin:20px}
  #c {margin:0 auto;width:500px;text-align:left}
  </style>
</head>
<body>
  <h2>Sinatra doesn&rsquo;t know this ditty.</h2>
  <img src='https://test.redhat.com:9090/compliance/__sinatra__/404.png'>
  <div id="c">
    Try this:
    <pre>put '/arf/1' do
  "Hello World"
end</pre>
  </div>
</body>
</html>
Upload failed: 404 "Not Found "

Version-Release number of selected component (if applicable):
Sat6.2.0-Beta-SNAP1

How reproducible:


Steps to Reproduce:
1. Run the command 'foreman_scap_client <policy_id>' on the client/host.
2.
3.

Actual results:
uploading results fails

Expected results:
uploading of results should be successful

Additional info:

Upstream issue raised, http://projects.theforeman.org/issues/13514

Comment 2 Shlomi Zadok 2016-03-05 18:28:05 UTC
This is because you don't have latest smart_proxy_openscap, version 0.5.3
Please ensure Capsule / Proxy has latest smart_proxy_openscap, version 0.5.3

NOT_A_BUG, afaik

Comment 3 Kedar Bidarkar 2016-03-07 08:24:38 UTC
Yeah I have the latest version of, smart_proxy_openscap :  0.5.3-1

~]# rpm -qav rubygem-smart_proxy_openscap
rubygem-smart_proxy_openscap-0.5.3-1.el7sat.noarch

Comment 6 Kedar Bidarkar 2016-03-17 10:50:06 UTC
This package is required in Sattools repo and not in Sat6 repo.

Currently unavailable in Sattools repo.


On the "new host" we still see the old RPM.
~]# rpm -qav | grep -i foreman_scap
rubygem-foreman_scap_client-0.1.0.4-1.el7sat.noarch

Comment 9 Kedar Bidarkar 2016-03-21 18:05:08 UTC
 I had tested it using the latest rpm and still face an issue,
 but now the packaging issue is fixed , but the original issue mentioned in initial bug description still exists.

@Shlomi: Do we require this PR? https://github.com/theforeman/smart_proxy_openscap/pull/23/files

Comment 10 Mike McCune 2016-03-21 19:48:00 UTC
Looks like this does need to get included in a downstream bu ild

Comment 20 Kedar Bidarkar 2016-04-12 06:47:37 UTC
I face the same issue as mentioned in comment 15, also below are the packages installed when using sat62-snap7.1 build.

[root@katello1 ~]# rpm -qav | grep -ie scap
rubygem-smart_proxy_openscap-0.5.3.2-1.el7sat.noarch
perl-Pod-Escapes-1.04-286.el7.noarch
openscap-scanner-1.2.5-3.el7.x86_64
puppet-foreman_scap_client-0.3.3-10.el7sat.noarch
scap-security-guide-0.1.25-3.el7.noarch
rubygem-openscap-0.4.3-3.el7sat.noarch
openscap-1.2.5-3.el7.x86_64
tfm-rubygem-foreman_openscap-0.5.3.3-1.el7sat.noarch
[root@katello1 ~]# rpm -qav | grep -ie foreman-installer
foreman-installer-katello-3.0.0.17-1.el7sat.noarch
foreman-installer-1.11.0.1-1.el7sat.noarch

Applying the workaround as per comment 17 works fine.

TESTED With sat62-snap7.1 build.

Comment 21 Bryan Kearney 2016-04-12 12:52:17 UTC
MOving to POST based on Comment 19 and 20.

Comment 22 Eric Helms 2016-04-12 16:18:34 UTC
Shlomi,

The indicated puppet-foreman_proxy changes should have been delivered with the version of foreman-installer indicated. Can you advise to figure out whether we are still missing a change or the verification steps just need updating to properly configure the system?

Comment 23 Shlomi Zadok 2016-04-13 13:39:50 UTC
Eric,
I am not sure.

It seems that symlinks are not followed / permission not respected?
When setting the full paths at openscap.yml, everything seems to work okay

Comment 24 Shlomi Zadok 2016-04-13 16:04:30 UTC
Created redmine issue http://projects.theforeman.org/issues/14621 from this bug

Comment 25 Shlomi Zadok 2016-04-13 16:08:36 UTC
Suggested fix: https://github.com/theforeman/smart_proxy_openscap/pull/28

Comment 26 Bryan Kearney 2016-04-13 18:04:07 UTC
Upstream bug component is Uncategorized

Comment 27 Bryan Kearney 2016-04-14 10:04:10 UTC
Upstream bug assigned to szadok

Comment 28 Bryan Kearney 2016-04-14 10:04:14 UTC
Upstream bug component is Uncategorized

Comment 34 Kedar Bidarkar 2016-04-22 07:35:14 UTC
VERIFIED with sat62-snap9


Now while running 'foreman_scap_client <policy_id>' the scan runs successfully and no errors seen.

Comment 35 Kedar Bidarkar 2016-05-17 14:40:22 UTC
Re-opening this bug as this issue is now seen with snap11.0 , tested with Sat6 on RHEL6.

Comment 36 Kedar Bidarkar 2016-05-17 14:50:19 UTC
Created attachment 1158338 [details]
unable to upload reports

Comment 37 Bryan Kearney 2016-05-17 16:31:19 UTC
Upstream bug component is Uncategorized

Comment 41 Bryan Kearney 2016-05-18 06:19:33 UTC
Upstream bug assigned to szadok

Comment 42 Ondřej Pražák 2016-05-20 07:03:00 UTC
I reproduced on RHEL6 and submitted patch to the upstream:
https://github.com/theforeman/smart_proxy_openscap/pull/33

Comment 44 Sanket Jagtap 2016-06-09 10:59:41 UTC
Build:Satellite 6.2 snap 14.1

Reports were generated and send to respective Openscap Capsule 

foreman_scap_client policy_id' was successfull

Comment 45 Bryan Kearney 2016-07-27 11:22:30 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/RHBA-2016:1501