Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1333107

Summary: Enabling openscap on foreman-proxy fails
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Kedar Bidarkar <kbidarka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, bkearney, cwelton, peter.vreman
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-06 17:55:49 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: 1122832    

Description Peter Vreman 2016-05-04 16:33:00 UTC
Description of problem:

Running the foreman-installer with the option '--enable-foreman-proxy-plugin-openscap' makes the foreman proxy failing to start.
Below is the fragment of the foreman-installer and the proxy.log of the foreman-proxy failing to start:

[ INFO 2016-05-04 16:21:44 verbose]  Class[Foreman_proxy::Config]: Scheduling refresh of Foreman_proxy::Plugin[openscap]
[ WARN 2016-05-04 16:22:09 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Plugin[openscap]/Package[rubygem-smart_proxy_openscap]/ensure: created
[ INFO 2016-05-04 16:22:09 verbose]  Foreman_proxy::Plugin[openscap]: Scheduling refresh of Class[Foreman_proxy::Service]
[ WARN 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]/content:
[ INFO 2016-05-04 16:22:10 verbose] --- /etc/foreman-proxy/settings.d/openscap.yml      2016-04-19 23:00:33.000000000 +0000
[ INFO 2016-05-04 16:22:10 verbose] +++ /tmp/puppet-file20160504-23045-9zqarr-0 2016-05-04 16:22:09.960035250 +0000
[ INFO 2016-05-04 16:22:10 verbose] @@ -1,21 +1,22 @@
[ INFO 2016-05-04 16:22:10 verbose]  ---
[ INFO 2016-05-04 16:22:10 verbose] -:enabled: true
[ INFO 2016-05-04 16:22:10 verbose] +:enabled: https
[ INFO 2016-05-04 16:22:10 verbose]
[ INFO 2016-05-04 16:22:10 verbose]  # Log file for the forwarding script.
[ INFO 2016-05-04 16:22:10 verbose] -#:openscap_send_log_file: /var/log/foreman-proxy/openscap-send.log
[ INFO 2016-05-04 16:22:10 verbose] +:openscap_send_log_file: /var/log/foreman-proxy/openscap-send.log
[ INFO 2016-05-04 16:22:10 verbose]
[ INFO 2016-05-04 16:22:10 verbose]  # Directory where OpenSCAP audits are stored
[ INFO 2016-05-04 16:22:10 verbose] -# before they are forwarded to Foreman
[ INFO 2016-05-04 16:22:10 verbose] -#:spooldir: /var/spool/foreman-proxy/openscap
[ INFO 2016-05-04 16:22:10 verbose] +# if they failed to post to Foreman. smart_proxy_openscap_send will
[ INFO 2016-05-04 16:22:10 verbose] +# try to re-send them.
[ INFO 2016-05-04 16:22:10 verbose] +:spooldir: /var/spool/foreman-proxy/openscap
[ INFO 2016-05-04 16:22:10 verbose]
[ INFO 2016-05-04 16:22:10 verbose]  # Directory where OpenSCAP content XML are stored
[ INFO 2016-05-04 16:22:10 verbose]  # So we will not request the XML from Foreman each time
[ INFO 2016-05-04 16:22:10 verbose] -#:contentdir: /var/lib/openscap/content
[ INFO 2016-05-04 16:22:10 verbose] +:contentdir: /var/lib/foreman-proxy/openscap/content
[ INFO 2016-05-04 16:22:10 verbose]
[ INFO 2016-05-04 16:22:10 verbose]  # Directory where OpenSCAP report XML are stored
[ INFO 2016-05-04 16:22:10 verbose]  # So Foreman can request arf xml reports
[ INFO 2016-05-04 16:22:10 verbose] -#:reportsdir: /usr/share/foreman-proxy/openscap/reports
[ INFO 2016-05-04 16:22:10 verbose] +:reportsdir: /var/lib/foreman-proxy/openscap/reports
[ INFO 2016-05-04 16:22:10 verbose]
[ INFO 2016-05-04 16:22:10 verbose]  # Directory where OpenSCAP report XML are stored
[ INFO 2016-05-04 16:22:10 verbose]  # In case sending to Foreman succeeded, yet failed to save to reportsdir
[ INFO 2016-05-04 16:22:10 verbose] -#:failed_dir: /usr/share/foreman-proxy/openscap/failed
[ INFO 2016-05-04 16:22:10 verbose] +:failed_dir: /var/lib/foreman-proxy/openscap/failed
[ INFO 2016-05-04 16:22:10 verbose]  Computing checksum on file /etc/foreman-proxy/settings.d/openscap.yml
[ INFO 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]: Filebucketed /etc/foreman-proxy/settings.d/openscap.yml to puppet with sum a7d281f2da825bede71f55a81fce7bce
[ WARN 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]/content: content changed '{md5}a7d281f2da825bede71f55a81fce7bce' to '{md5}5008f30f3fcc462375398d96927a24c8'
[ WARN 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]/group: group changed 'root' to 'foreman-proxy'
[ WARN 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]/mode: mode changed '0644' to '0640'
[ INFO 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]: Scheduling refresh of Class[Foreman_proxy::Service]
[ INFO 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]: Scheduling refresh of Class[Foreman_proxy::Service]
[ INFO 2016-05-04 16:22:10 verbose]  /Stage[main]/Foreman_proxy::Plugin::Openscap/Foreman_proxy::Settings_file[openscap]/File[/etc/foreman-proxy/settings.d/openscap.yml]: Scheduling refresh of Class[Foreman_proxy::Service]
[ INFO 2016-05-04 16:22:10 verbose]  Class[Foreman_proxy::Service]: Scheduling refresh of Service[foreman-proxy]
[ERROR 2016-05-04 16:22:49 verbose]  /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Failed to call refresh: Could not start Service[foreman-proxy]: Execution of '/sbin/service foreman-proxy start' returned 1: Starting foreman-proxy: [FAILED]
[ERROR 2016-05-04 16:22:49 verbose]  /Stage[main]/Foreman_proxy::Service/Service[foreman-proxy]: Could not start Service[foreman-proxy]: Execution of '/sbin/service foreman-proxy start' returned 1: Starting foreman-proxy: [FAILED]


Contents of /var/log/foreman-proxy/proxy.log:

# Logfile created on Wed May 04 09:41:33 +0000 2016 by logger.rb/1.2.6
E, [2016-05-04T16:22:49.560923 #24138] ERROR -- : Error during startup, terminating. /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/lib/ruby/gems/1.8/gems/smart_proxy_openscap-0.5.3.3/lib/smart_proxy_openscap/openscap_api.rb:41: syntax error, unexpected '.', expecting kEND
          .store_archive(request.body.string)
           ^
/usr/lib/ruby/gems/1.8/gems/smart_proxy_openscap-0.5.3.3/lib/smart_proxy_openscap/openscap_api.rb:44: syntax error, unexpected '.', expecting kEND
          .store_failed(request.body.string)
           ^
/usr/lib/ruby/gems/1.8/gems/smart_proxy_openscap-0.5.3.3/lib/smart_proxy_openscap/openscap_api.rb:51: syntax error, unexpected '.', expecting kEND
          .store_spool(request.body.string)
           ^
/usr/lib/ruby/gems/1.8/gems/smart_proxy_openscap-0.5.3.3/lib/smart_proxy_openscap/openscap_api.rb:61: syntax error, unexpected '.', expecting kEND
          .get_arf_xml(params[:digest])
           ^
/usr/lib/ruby/gems/1.8/gems/smart_proxy_openscap-0.5.3.3/lib/smart_proxy_openscap/openscap_api.rb:70: syntax error, unexpected '.', expecting kEND
          .delete_arf_file
           ^
/usr/lib/ruby/gems/1.8/gems/smart_proxy_openscap-0.5.3.3/lib/smart_proxy_openscap/openscap_api.rb:79: syntax error, unexpected '.', expecting kEND
          .get_arf_html(params[:digest])
           ^


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Kedar Bidarkar 2016-05-24 18:18:37 UTC
IS this with RHEL6, if so then this will be fixed for GA.

This appears to be a duplicate of, https://bugzilla.redhat.com/show_bug.cgi?id=1329394

Comment 2 Peter Vreman 2016-05-25 07:12:14 UTC
Kedar,

Correct, we use RHEL6.8.

Peter

Comment 3 Bryan Kearney 2016-06-06 17:55:49 UTC

*** This bug has been marked as a duplicate of bug 1329394 ***