Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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: VERIFIED
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: SCAP Plugin
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
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-04-16 06:01 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:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 26556 None None None 2019-04-08 09:23:29 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@redhat.com

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


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