Bug 1441070

Summary: Warning messages when running foreman-rake console
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: InfrastructureAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.10CC: bbuckingham, bkearney, fgarciad, h.teunis, inecas, jcallaha, kgaikwad, riehecky, sshtein
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.15.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:49:54 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 Lukas Zapletal 2017-04-11 07:19:42 UTC
Remove warning messages when running console to improve user experience when debugging issues:

[root@sat foreman]# foreman-rake console
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.41/app/models/concerns/satellite_packages.rb:4: warning: already initialized constant Katello::Ping::PACKAGES
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.105/app/models/katello/ping.rb:7: warning: previous definition of PACKAGES was here
/usr/share/foreman/lib/tasks/console.rake:4: warning: already initialized constant ARGV
Loading production environment (Rails 4.1.5)
irb(main):001:0> 

Please also fix the console.rake (4) error if possible.

Comment 1 Ivan Necas 2017-04-11 07:49:29 UTC
We are tracking the Katello::Ping::PACKAGES in https://bugzilla.redhat.com/show_bug.cgi?id=1429418. I'm keeping this bug opened for the `warning: already initialized constant ARGV`

Comment 2 Ivan Necas 2017-04-11 08:32:15 UTC
Created redmine issue http://projects.theforeman.org/issues/19241 from this bug

Comment 3 Ivan Necas 2017-04-11 08:38:14 UTC
Fix proposed at https://github.com/theforeman/foreman/pull/4450

Comment 5 Satellite Program 2017-04-11 10:04:13 UTC
Upstream bug assigned to inecas

Comment 6 Satellite Program 2017-04-11 10:04:16 UTC
Upstream bug assigned to inecas

Comment 7 Satellite Program 2017-04-12 16:04:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19241 has been resolved.

Comment 8 Kavita 2017-08-09 09:53:20 UTC
Verified.
Version Tested: Satellite-6.3 Snap 9.
rake-console output screen-shots attached.

** RPM package versions:

satellite-6.3.0-16.0.beta.el7sat.noarch
foreman-1.15.2-1.el7sat.noarch
katello-3.4.2-1.el7sat.noarch
tfm-rubygem-hammer_cli-0.10.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7sat.noarch

Resolved -> `warning: already initialized constant ARGV` is not showing on sat 6.3.


*** New Bug ***
warning message related to redhat-access is showing up when running console. Created new BZ[https://bugzilla.redhat.com/show_bug.cgi?id=1479720]

[root@sat63-qa-rhel7 ~]# foreman-rake console
/opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-2.0.3/app/services/redhat_access/telemetry/look_ups.rb:171: warning: key :hosts is duplicated and overwritten on line 172
Loading production environment (Rails 4.2.6)
Failed to load console gems, starting anyway
irb(main):001:0> exit

Comment 9 Satellite Program 2018-02-21 16:49:54 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-2018:0336