This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2182861 - Generating SCAP report fails with cannot load such file -- json (LoadError) error on RHEL 9
Summary: Generating SCAP report fails with cannot load such file -- json (LoadError) e...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-29 19:39 UTC by Manu Sunil
Modified: 2024-06-06 16:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 16:11:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   SAT-19504 0 None Migrated None 2024-06-06 16:11:49 UTC

Description Manu Sunil 2023-03-29 19:39:10 UTC
Description of problem:

- Generating SCAP report fails with the following error on RHEL 9.

  ~~~
  cannot load such file -- json (LoadError)
  ~~~

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

- RHEL 9

How reproducible:

- In scenarios where rubygem-json is not installed. 

Steps to Reproduce:

1. Exclude the package rubygem-json from the repository. A CV filter can be used if the client is registered to a Satellite

2. Install the package `rubygem-foreman_scap_client`

3. Run `/usr/bin/foreman_scap_client`

Actual results:

- foreman_scap_client fails with the following error.

  ~~~
  # /usr/bin/foreman_scap_client 1
  <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- json (LoadError)
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from /usr/share/gems/gems/foreman_scap_client-0.5.0/lib/foreman_scap_client/base_client.rb:9:in `<top (required)>'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from /usr/share/gems/gems/foreman_scap_client-0.5.0/lib/foreman_scap_client/client.rb:1:in `<top (required)>'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from /usr/share/gems/gems/foreman_scap_client-0.5.0/lib/foreman_scap_client.rb:2:in `<top (required)>'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from /usr/share/gems/gems/foreman_scap_client-0.5.0/bin/foreman_scap_client:3:in `<top (required)>'
      from /usr/bin/foreman_scap_client:23:in `load'
      from /usr/bin/foreman_scap_client:23:in `<main>'
  ~~~

Expected results:

- Installation of rubygem-foreman_scap_client should fail if rubygem-json is not available for some reason. 

Additional info:

- There seems to be some issue with the dependencies.

- rubygem-foreman_scap_client can be installed with or without the rubygem-json package. See the transactions below. On the second transaction, rubygem-json package was filtered using CV filter.

  ~~~
  # dnf install rubygem-foreman_scap_client        

  Dependencies resolved.
  ==================================================================================================================================================================================
   Package                                        Architecture              Version                              Repository                                                    Size
  ==================================================================================================================================================================================
  Installing:
   rubygem-foreman_scap_client                    noarch                    0.5.0-1.el9sat                       satellite-client-6-for-rhel-9-x86_64-rpms                     25 k
  Installing dependencies:
   bzip2                                          x86_64                    1.0.8-8.el9                          rhel-9-for-x86_64-baseos-rpms                                 60 k
   libtool-ltdl                                   x86_64                    2.4.6-45.el9                         rhel-9-for-x86_64-appstream-rpms                              39 k
   libxslt                                        x86_64                    1.1.34-9.el9                         rhel-9-for-x86_64-appstream-rpms                             247 k
   openscap                                       x86_64                    1:1.3.6-4.el9                        rhel-9-for-x86_64-appstream-rpms                             2.0 M
   openscap-scanner                               x86_64                    1:1.3.6-4.el9                        rhel-9-for-x86_64-appstream-rpms                              61 k
   ruby                                           x86_64                    3.0.4-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              45 k
   ruby-libs                                      x86_64                    3.0.4-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                             3.3 M
   rubygem-json                                   x86_64                    2.5.1-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              63 k
   rubygem-psych                                  x86_64                    3.3.2-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              64 k
   rubygems                                       noarch                    3.2.33-160.el9_0                     rhel-9-for-x86_64-appstream-rpms                             310 k
   xmlsec1                                        x86_64                    1.2.29-9.el9                         rhel-9-for-x86_64-appstream-rpms                             193 k
   xmlsec1-openssl                                x86_64                    1.2.29-9.el9                         rhel-9-for-x86_64-appstream-rpms                              93 k
  Installing weak dependencies:
   ruby-default-gems                              noarch                    3.0.4-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              50 k
   rubygem-bigdecimal                             x86_64                    3.0.0-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              60 k
   rubygem-bundler                                noarch                    2.2.33-160.el9_0                     rhel-9-for-x86_64-appstream-rpms                             460 k
   rubygem-io-console                             x86_64                    0.5.7-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              30 k
   rubygem-rdoc                                   noarch                    6.3.3-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                             444 k
  
  Transaction Summary
  ==================================================================================================================================================================================
  Install  18 Packages
  ~~~


  ~~~
  # dnf install rubygem-foreman_scap_client
  
  Dependencies resolved.
  ==================================================================================================================================================================================
   Package                                        Architecture              Version                              Repository                                                    Size
  ==================================================================================================================================================================================
  Installing:
   rubygem-foreman_scap_client                    noarch                    0.5.0-1.el9sat                       satellite-client-6-for-rhel-9-x86_64-rpms                     25 k
  Installing dependencies:
   bzip2                                          x86_64                    1.0.8-8.el9                          rhel-9-for-x86_64-baseos-rpms                                 60 k
   libtool-ltdl                                   x86_64                    2.4.6-45.el9                         rhel-9-for-x86_64-appstream-rpms                              39 k
   libxslt                                        x86_64                    1.1.34-9.el9                         rhel-9-for-x86_64-appstream-rpms                             247 k
   openscap                                       x86_64                    1:1.3.6-4.el9                        rhel-9-for-x86_64-appstream-rpms                             2.0 M
   openscap-scanner                               x86_64                    1:1.3.6-4.el9                        rhel-9-for-x86_64-appstream-rpms                              61 k
   ruby                                           x86_64                    3.0.4-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              45 k
   ruby-libs                                      x86_64                    3.0.4-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                             3.3 M
   rubygem-psych                                  x86_64                    3.3.2-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              64 k
   rubygems                                       noarch                    3.2.33-160.el9_0                     rhel-9-for-x86_64-appstream-rpms                             310 k
   xmlsec1                                        x86_64                    1.2.29-9.el9                         rhel-9-for-x86_64-appstream-rpms                             193 k
   xmlsec1-openssl                                x86_64                    1.2.29-9.el9                         rhel-9-for-x86_64-appstream-rpms                              93 k
  Installing weak dependencies:
   ruby-default-gems                              noarch                    3.0.4-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              50 k
   rubygem-bigdecimal                             x86_64                    3.0.0-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              60 k
   rubygem-bundler                                noarch                    2.2.33-160.el9_0                     rhel-9-for-x86_64-appstream-rpms                             460 k
   rubygem-io-console                             x86_64                    0.5.7-160.el9_0                      rhel-9-for-x86_64-appstream-rpms                              30 k
  
  Transaction Summary
  ==================================================================================================================================================================================
  Install  16 Packages
  ~~~

- rubygem-foreman_scap_client installation on RHEL 7 on the other hand fails if rubygem-json is not present.

  ~~~
  # yum install rubygem-foreman_scap_client
  Loaded plugins: product-id, search-disabled-repos, subscription-manager
  Resolving Dependencies
  --> Running transaction check
  ---> Package rubygem-foreman_scap_client.noarch 0:0.5.0-1.el7sat will be installed
  --> Processing Dependency: /usr/bin/ruby for package: rubygem-foreman_scap_client-0.5.0-1.el7sat.noarch
  --> Processing Dependency: bzip2 for package: rubygem-foreman_scap_client-0.5.0-1.el7sat.noarch
  --> Processing Dependency: openscap-scanner for package: rubygem-foreman_scap_client-0.5.0-1.el7sat.noarch
  --> Processing Dependency: ruby(release) for package: rubygem-foreman_scap_client-0.5.0-1.el7sat.noarch
  --> Processing Dependency: ruby(rubygems) for package: rubygem-foreman_scap_client-0.5.0-1.el7sat.noarch
  --> Running transaction check
  ---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
  ---> Package openscap-scanner.x86_64 0:1.2.17-15.el7_9 will be installed
  --> Processing Dependency: openscap(x86-64) = 1.2.17-15.el7_9 for package: openscap-scanner-1.2.17-15.el7_9.x86_64
  --> Processing Dependency: libopenscap.so.8()(64bit) for package: openscap-scanner-1.2.17-15.el7_9.x86_64
  ---> Package ruby.x86_64 0:2.0.0.648-39.el7_9 will be installed
  --> Processing Dependency: rubygem(bigdecimal) >= 1.2.0 for package: ruby-2.0.0.648-39.el7_9.x86_64
  ---> Package ruby-libs.x86_64 0:2.0.0.648-39.el7_9 will be installed
  ---> Package rubygems.noarch 0:2.0.14.1-39.el7_9 will be installed
  --> Processing Dependency: rubygem(io-console) >= 0.4.2 for package: rubygems-2.0.14.1-39.el7_9.noarch
  --> Processing Dependency: rubygem(psych) >= 2.0.0 for package: rubygems-2.0.14.1-39.el7_9.noarch
  --> Processing Dependency: rubygem(rdoc) >= 4.0.0 for package: rubygems-2.0.14.1-39.el7_9.noarch
  --> Running transaction check
  ---> Package openscap.x86_64 0:1.2.17-15.el7_9 will be installed
  ---> Package rubygem-bigdecimal.x86_64 0:1.2.0-39.el7_9 will be installed
  ---> Package rubygem-io-console.x86_64 0:0.4.2-39.el7_9 will be installed
  ---> Package rubygem-psych.x86_64 0:2.0.0-39.el7_9 will be installed
  ---> Package rubygem-rdoc.noarch 0:4.0.0-39.el7_9 will be installed
  --> Processing Dependency: ruby(irb) = 2.0.0.648 for package: rubygem-rdoc-4.0.0-39.el7_9.noarch
  --> Processing Dependency: rubygem(json) >= 1.7.7 for package: rubygem-rdoc-4.0.0-39.el7_9.noarch
  --> Running transaction check
  ---> Package ruby-irb.noarch 0:2.0.0.648-39.el7_9 will be installed
  ---> Package rubygem-rdoc.noarch 0:4.0.0-39.el7_9 will be installed
  --> Processing Dependency: rubygem(json) >= 1.7.7 for package: rubygem-rdoc-4.0.0-39.el7_9.noarch
  --> Finished Dependency Resolution
  Error: Package: rubygem-rdoc-4.0.0-39.el7_9.noarch (rhel-7-server-rpms)
             Requires: rubygem(json) >= 1.7.7
   You could try using --skip-broken to work around the problem
   You could try running: rpm -Va --nofiles --nodigest
  ~~~

Comment 1 Eric Helms 2024-06-06 16:11:50 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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