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 1441070 - Warning messages when running foreman-rake console
Summary: Warning messages when running foreman-rake console
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Infrastructure
Version: 6.2.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-11 07:19 UTC by Lukas Zapletal
Modified: 2019-04-01 20:27 UTC (History)
9 users (show)

Fixed In Version: foreman-1.15.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:49:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 19241 0 Normal Closed warning: already initialized constant ARGV running foreman-rake console 2020-02-28 18:26:22 UTC

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


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