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 1894009 - Generating Red Hat cloud inventory fails if there are foreman_hooks available
Summary: Generating Red Hat cloud inventory fails if there are foreman_hooks available
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.8.0
Hardware: All
OS: All
medium
high
Target Milestone: 6.9.0
Assignee: Shimon Shtein
QA Contact: Mirek Długosz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-03 10:07 UTC by Anand Agrawal
Modified: 2024-12-20 19:21 UTC (History)
6 users (show)

Fixed In Version: tfm-rubygem-foreman_hooks-0.3.17
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1899320 1899325 (view as bug list)
Environment:
Last Closed: 2021-04-21 13:18:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_hooks pull 61 0 None closed Fix error caused by loading string constants 2021-02-03 16:10:06 UTC
Red Hat Knowledge Base (Solution) 5534601 0 None None None 2020-11-03 10:08:44 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:19:10 UTC

Description Anand Agrawal 2020-11-03 10:07:59 UTC
Description of problem:

Generating Red Hat clound inventory via Web UI or foreman-rake fails as below:

# foreman-rake rh_cloud_inventory:report:generate

API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
rake aborted!
NoMethodError: undefined method `name' for "2.0.12":String
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_hooks-0.3.16/lib/foreman_hooks/as_dependencies_hook.rb:6:in `block (2 levels) in 
load_missing_constant'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_rh_cloud-2.0.12/lib/tasks/rh_cloud_inventory.rake:15:in `block (3 levels) in <top (required)>'

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

How reproducible:

Always
Steps to Reproduce:
1. Enable foreman_hooks on Red Hat Satellite
2. Now try to generate Red Hat cloud inventory
3.

Actual results:
rake aborted!
NoMethodError: undefined method `name' for "2.0.12":String
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_hooks-0.3.16/lib/foreman_hooks/as_dependencies_hook.rb:6:in `block (2 levels) in 
load_missing_constant'

Expected results:
It should be successful

Additional info:

After removing the foreman-hooks,  `foreman-rake rh_cloud_inventory:report:generate` works successfully

Comment 3 Adam Ruzicka 2020-11-18 14:21:26 UTC
Fix was merged in upstream and release in tfm-rubygem-foreman_hooks-0.3.17

Comment 8 errata-xmlrpc 2021-04-21 13:18:52 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 (Moderate: Satellite 6.9 Release), 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-2021:1313


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