Bug 1313805 - Uploading results while running 'foreman_scap_client policy_id' fails on the client
Uploading results while running 'foreman_scap_client policy_id' fails on the ...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Uncategorized (Show other bugs)
Unspecified Unspecified
unspecified Severity high (vote)
: GA
: 6.2
Assigned To: Shlomi Zadok
Sanket Jagtap
: Regression, Triaged
Depends On:
Blocks: GSS_Sat6Beta_Tracker/GSS_Sat6_Tracker
  Show dependency treegraph
Reported: 2016-03-02 06:45 EST by Kedar Bidarkar
Modified: 2016-07-27 07:22 EDT (History)
9 users (show)

See Also:
Fixed In Version: foreman-installer-,rubygem-smart_proxy_openscap-,rubygem-smart_proxy_openscap-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-27 07:22:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
unable to upload reports (228.05 KB, text/plain)
2016-05-17 10:50 EDT, Kedar Bidarkar
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 14621 None None None 2016-04-22 11:52 EDT

  None (edit)
Description Kedar Bidarkar 2016-03-02 06:45:45 EST
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>
  <style type="text/css">
  body { text-align:center;font-family:helvetica,arial;font-size:22px;
  #c {margin:0 auto;width:500px;text-align:left}
  <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"
Upload failed: 404 "Not Found "

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

How reproducible:

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

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 13:28:05 EST
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 03:24:38 EST
Yeah I have the latest version of, smart_proxy_openscap :  0.5.3-1

~]# rpm -qav rubygem-smart_proxy_openscap
Comment 6 Kedar Bidarkar 2016-03-17 06:50:06 EDT
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
Comment 9 Kedar Bidarkar 2016-03-21 14:05:08 EDT
 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 15:48:00 EDT
Looks like this does need to get included in a downstream bu ild
Comment 20 Kedar Bidarkar 2016-04-12 02:47:37 EDT
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
[root@katello1 ~]# rpm -qav | grep -ie foreman-installer

Applying the workaround as per comment 17 works fine.

TESTED With sat62-snap7.1 build.
Comment 21 Bryan Kearney 2016-04-12 08:52:17 EDT
MOving to POST based on Comment 19 and 20.
Comment 22 Eric Helms 2016-04-12 12:18:34 EDT

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 09:39:50 EDT
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 12:04:30 EDT
Created redmine issue http://projects.theforeman.org/issues/14621 from this bug
Comment 25 Shlomi Zadok 2016-04-13 12:08:36 EDT
Suggested fix: https://github.com/theforeman/smart_proxy_openscap/pull/28
Comment 26 Bryan Kearney 2016-04-13 14:04:07 EDT
Upstream bug component is Uncategorized
Comment 27 Bryan Kearney 2016-04-14 06:04:10 EDT
Upstream bug assigned to szadok@redhat.com
Comment 28 Bryan Kearney 2016-04-14 06:04:14 EDT
Upstream bug component is Uncategorized
Comment 34 Kedar Bidarkar 2016-04-22 03:35:14 EDT
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 10:40:22 EDT
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 10:50 EDT
Created attachment 1158338 [details]
unable to upload reports
Comment 37 Bryan Kearney 2016-05-17 12:31:19 EDT
Upstream bug component is Uncategorized
Comment 41 Bryan Kearney 2016-05-18 02:19:33 EDT
Upstream bug assigned to szadok@redhat.com
Comment 42 Ondřej Pražák 2016-05-20 03:03:00 EDT
I reproduced on RHEL6 and submitted patch to the upstream:
Comment 44 Sanket Jagtap 2016-06-09 06:59:41 EDT
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 07:22:30 EDT
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.


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