Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1533424 - smart_proxy_openscap does not rescue Errno::ECONNREFUSED
Summary: smart_proxy_openscap does not rescue Errno::ECONNREFUSED
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Ondřej Pražák
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-11 10:15 UTC by Ondřej Pražák
Modified: 2019-04-01 20:27 UTC (History)
5 users (show)

Fixed In Version: smart_proxy_openscap-0.6.9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proxy error (226.57 KB, text/html)
2018-01-11 10:15 UTC, Ondřej Pražák
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22245 0 None None None 2018-01-11 10:17:24 UTC

Description Ondřej Pražák 2018-01-11 10:15:35 UTC
Created attachment 1379937 [details]
proxy error

Description of problem:
We do not rescue from Errno::ECONNREFUSED exception on proxy, so when proxy tries to upload Arf report to server, connection is refused and exception is raised, which is not handled gracefully.


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

How reproducible:
always

Steps to Reproduce:
1. Stop satellite server: systemctl stop httpd
2. generate a report by running foreman_scap_client manually, proxy should save it to spool since server is not available
3. Observe the error

Actual results:
Error from proxy gets printed as a response to client, see the attachment


Expected results:
No error gets printed on stdout, proxy saves the report to spool

Additional info:

Comment 1 Ondřej Pražák 2018-01-11 10:17:22 UTC
Created redmine issue http://projects.theforeman.org/issues/22245 from this bug

Comment 2 Satellite Program 2018-01-11 11:24:28 UTC
Upstream bug assigned to oprazak

Comment 3 Satellite Program 2018-01-11 11:24:31 UTC
Upstream bug assigned to oprazak

Comment 10 Satellite Program 2018-01-16 17:26:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/22245 has been resolved.

Comment 11 Sanket Jagtap 2018-01-31 14:59:34 UTC
Build: Satellite 6.3.0 snap 33


[root@sjagtap-qe-capsule openscap]# rpm -qa | grep scap
rubygem-openscap-0.4.7-1.el7sat.noarch
openscap-1.2.14-2.el7.x86_64
rubygem-smart_proxy_openscap-0.6.9-1.el7sat.noarch
puppet-foreman_scap_client-0.3.16-1.el7sat.noarch
perl-Pod-Escapes-1.04-292.el7.noarch

Steps to Reproduce:
1. Stop satellite server: systemctl stop httpd
2. generate a report by running foreman_scap_client manually, proxy should save it to spool since server is not available

No error , arf was sent to spool dir


root@qe-capsule-feature-rhel6 ~]# systemctl stop httpd

[root@bkr-hv03-guest17 ~]# foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_standard  --results-arf /tmp/d20180131-32194-1ias1c7/results.xml /var/lib/openscap/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d.xml
WARNING: This content points out to the remote resources. Use `--fetch-remote-resources' option to download them.
WARNING: Skipping https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2 file which is referenced from XCCDF content
DEBUG: running: /usr/bin/bzip2 /tmp/d20180131-32194-1ias1c7/results.xml
Uploading results to https://capsule:9090/compliance/arf/1

[root@sjagtap-qe-capsule openscap]# ls
arf
[root@sjagtap-qe-capsule openscap]# pwd
/var/spool/foreman-proxy/openscap

Comment 12 Satellite Program 2018-02-21 16:54:17 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:0336


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