Bug 1766529

Summary: foreman-rake rescan_reports_origins fails with NameError: uninitialized constant ConfigReport
Product: Red Hat Satellite Reporter: Nagoor Shaik <nshaik>
Component: UncategorizedAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: akarimi, inecas, ktordeur, pcreech, tbrisker
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:26:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nagoor Shaik 2019-10-29 11:06:22 UTC
Description of problem:
foreman-rake rescan_reports_origins fails with NameError: uninitialized constant ConfigReport

Version-Release number of selected component (if applicable):
Satellite 6.4.x
Satellite 6.5.x
Satellite 6.6 GA

How reproducible:
100%

Steps to Reproduce:
1. Install Satellite
2. Run the foreman-rake rescan_reports_origins which fails with following traceback

# foreman-rake rescan_reports_origins --trace
** Invoke rescan_reports_origins (first_time)
** Execute rescan_reports_origins
rake aborted!
NameError: uninitialized constant ConfigReport
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_hooks-0.3.15/lib/foreman_hooks/as_dependencies_hook.rb:4:in `load_missing_constant'
/usr/share/foreman/lib/tasks/rescan_reports_origins.rake:3:in `block in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in `load'
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in `<main>'
Tasks: TOP => rescan_reports_origins

Actual results:
# foreman-rake rescan_reports_origins fails with NameError: uninitialized constant ConfigReport

Expected results:
Should work as expected

Additional info:
This effects all version of Satellite starting with Satellite 6.4 to 6.6

Comment 3 Lukas Pramuk 2020-03-07 13:58:40 UTC
VERIFIED.

@Satellite 6.7.0 Snap14
foreman-1.24.1.9-1.el7sat.noarch

# foreman-rake rescan_reports_origins --trace
** Invoke rescan_reports_origins (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute rescan_reports_origins
Scanning 689 reports, this can take a long time, it's safe to interrupt and rerun later...

>>> foreman-rake rescan_reports_origins works as expected

Comment 6 errata-xmlrpc 2020-04-14 13:26:02 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-2020:1454