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 1696969 - Unable to upload arf report on rhel 6 client: unexpected '.', expecting kEND (SyntaxError)
Summary: Unable to upload arf report on rhel 6 client: unexpected '.', expecting kEND ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.5.0
Assignee: Ondřej Pražák
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-06 18:17 UTC by Nikhil Kathole
Modified: 2019-11-05 22:48 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman_scap_client-0.4.5,rubygem-foreman_scap_client-0.4.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:40:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 26556 0 None None None 2019-04-08 09:23:29 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:40:43 UTC

Description Nikhil Kathole 2019-04-06 18:17:27 UTC
Description of problem:

Trying to upload scap report on rhel 6 client gives error

# foreman_scap_client 2
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/lib/foreman_scap_client/client.rb:61: syntax error, unexpected '.', expecting kEND (SyntaxError)
                      .select { |item| item.start_wit...
                       ^
/usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/lib/foreman_scap_client/client.rb:62: syntax error, unexpected '.', expecting kEND
                      .join("\n")
                       ^
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/lib/foreman_scap_client.rb:2
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/bin/foreman_scap_client:3
	from /usr/bin/foreman_scap_client:19:in `load'
	from /usr/bin/foreman_scap_client:19



Version-Release number of selected component (if applicable): 
Satellite 6.5 snap 23

rubygem-foreman_scap_client-0.4.4-1.el6sat.noarch


How reproducible: always


Steps to Reproduce:
1. Register rhel 6 client to satellite
2. Assign scap policy
3. Try to upload report to satellite

Actual results:
# foreman_scap_client 2
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/lib/foreman_scap_client/client.rb:61: syntax error, unexpected '.', expecting kEND (SyntaxError)
                      .select { |item| item.start_wit...
                       ^
/usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/lib/foreman_scap_client/client.rb:62: syntax error, unexpected '.', expecting kEND
                      .join("\n")
                       ^
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/lib/foreman_scap_client.rb:2
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /usr/lib/ruby/gems/1.8/gems/foreman_scap_client-0.4.4/bin/foreman_scap_client:3
	from /usr/bin/foreman_scap_client:19:in `load'
	from /usr/bin/foreman_scap_client:19



Expected results: Successful upload of arf reports.


Additional info:

/etc/foreman_scap_client/config.yaml has correct configurations.

# policy (key is id as in Foreman)

2:
  :profile: 'xccdf_org.ssgproject.content_profile_standard'
  :content_path: '/var/lib/openscap/content/6298742afc45309f86ac467c0c9a3e433ff505dd3d237dd8cbf72be1a02937bb.xml'
  # Download path
  # A path to download SCAP content from proxy
  :download_path: '/compliance/policies/2/content/6298742afc45309f86ac467c0c9a3e433ff505dd3d237dd8cbf72be1a02937bb'
  :tailoring_path: ''
  :tailoring_download_path: ''

Comment 4 Ondřej Pražák 2019-04-08 09:23:28 UTC
Created redmine issue http://projects.theforeman.org/issues/26556 from this bug

Comment 5 Bryan Kearney 2019-04-08 14:07:10 UTC
Upstream bug assigned to oprazak

Comment 7 Nikhil Kathole 2019-04-16 06:01:32 UTC
VERIFIED

Version tested:
Satellite 6.5 snap 24

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-RHEL6.xml.bz2 file which is referenced from XCCDF content

File /var/lib/openscap/content/6298742afc45309f86ac467c0c9a3e433ff505dd3d237dd8cbf72be1a02937bb.xml is missing. Downloading it from proxy.
Download SCAP content xml from: https://satellite.example.com:9090/compliance/policies/2/content/6298742afc45309f86ac467c0c9a3e433ff505dd3d237dd8cbf72be1a02937bb
DEBUG: running: oscap xccdf eval  --profile xccdf_org.ssgproject.content_profile_standard  --results-arf /tmp/d20190416-8474-quv5xh/results.xml /var/lib/openscap/content/6298742afc45309f86ac467c0c9a3e433ff505dd3d237dd8cbf72be1a02937bb.xml
DEBUG: running: /usr/bin/env bzip2 /tmp/d20190416-8474-quv5xh/results.xml
Uploading results to https://satellite.example.com:9090/compliance/arf/2
Report uploaded, report id: 194

Exit status: 0

Comment 9 errata-xmlrpc 2019-05-14 12:40:38 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-2019:1222


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