Bug #11907

openscap seeems to fail on good bzip2 files

Added by cristian falcas almost 3 years ago. Updated over 2 years ago.

Status:ClosedSpent time:-
Assigned To:-
Target version:0.5.0
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman_openscap/pull/135
Story points-
Velocity based estimate-



It looks like openscap foreman plugin fails to decompress a valid bzip2 file generate by a report:

| Started POST "/api/v2/compliance/arf_reports/2ea3aa0c-ab60-4d91-8f65-eb4a72a0da6b/18/2015-09-21" for at 2015-09-22 03:30:58 -0400
2015-09-22 03:30:58 [app] [I] Processing by Api::V2::Compliance::ArfReportsController#create as */*
2015-09-22 03:30:58 [app] [I] Parameters: {"apiv"=>"v2", "cname"=>"2ea3aa0c-ab60-4d91-8f65-eb4a72a0da6b", "policy_id"=>"18", "date"=>"2015-09-21"}
2015-09-22 03:31:01 [app] [W] Action failed | OpenSCAP::OpenSCAPError: Could not read from bz_stream: BZ2_bzDecompress returns -4 [bz2.c:157] | Could not create Result DataStream session: File is not Result DataStream. [ds_rds_session.c:54] | | /opt/rh/ruby193/root/usr/share/gems/gems/openscap-0.4.2/lib/openscap/openscap.rb:34:in `raise!' | /opt/rh/ruby193/root/usr/share/gems/gems/openscap-0.4.2/lib/openscap/ds/arf.rb:30:in `initialize'

I managed to uncompress the above file perfectly fine with bunzip2.

Also, we have multiple files where the processing fails.

Let me know if you need the original compressed file.


#1 Updated by Shlomi Zadok over 2 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 0.5.0
  • Pull request https://github.com/theforeman/foreman_openscap/pull/135 added

Should be solved with https://github.com/theforeman/foreman_openscap/pull/135 as parsing is done at the smart-proxy side

#2 Updated by Shlomi Zadok over 2 years ago

  • % Done changed from 0 to 90

#3 Updated by Shlomi Zadok over 2 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF