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 1408184 - foreman-rake hosts:scan_out_of_sync fails with "LoadError: cannot load such file -- ping"
Summary: foreman-rake hosts:scan_out_of_sync fails with "LoadError: cannot load such ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Other
Version: 6.2.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Daniel Lobato Garcia
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1417127
TreeView+ depends on / blocked
 
Reported: 2016-12-22 12:10 UTC by Ashish Humbe
Modified: 2020-04-15 15:01 UTC (History)
8 users (show)

Fixed In Version: foreman-1.11.0.66-2 tfm-rubygem-net-ping-2.0.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1417127 (view as bug list)
Environment:
Last Closed: 2017-03-06 15:12:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17837 0 Normal Closed foreman-rake hosts:scan_out_of_sync fails with "LoadError: cannot load such file -- ping" 2020-01-17 06:18:19 UTC

Description Ashish Humbe 2016-12-22 12:10:55 UTC
Description of problem:

On Satellite v 6.2.5 below rake task fails with error: 

# foreman-rake hosts:scan_out_of_sync
rake aborted!
LoadError: cannot load such file -- ping
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/usr/share/foreman/lib/tasks/hosts.rake:18:in `block (2 levels) in <top (required)>'
Polyglot::PolyglotLoadError: Failed to load ping using extensions deface, rb
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:55:in `load'
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:68:in `rescue in require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/usr/share/foreman/lib/tasks/hosts.rake:18:in `block (2 levels) in <top (required)>'
Tasks: TOP => hosts:scan_out_of_sync
(See full trace by running task with --trace)


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

How reproducible:
Always

Steps to Reproduce:
1. Run # foreman-rake hosts:scan_out_of_sync
2.
3.

Actual results:


Expected results:
This command should work or should have alternate utility. 

Additional info:

Comment 1 Daniel Lobato Garcia 2016-12-23 08:43:06 UTC
Created redmine issue http://projects.theforeman.org/issues/17837 from this bug

Comment 2 Daniel Lobato Garcia 2016-12-23 08:49:41 UTC
Submitted a PR upstream with https://github.com/theforeman/foreman/pull/4127 - the task is 100% broken right now.

Marking as 6.2.z as cherry-picking the fix has no risk to the rest of the code at all, the code in the task is self contained.

Comment 4 Bryan Kearney 2016-12-23 11:03:35 UTC
Upstream bug assigned to dlobatog

Comment 5 Bryan Kearney 2016-12-23 11:03:38 UTC
Upstream bug assigned to dlobatog

Comment 6 Bryan Kearney 2017-01-02 17:03:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17837 has been resolved.

Comment 9 jcallaha 2017-02-17 21:05:30 UTC
Failed QA in Satellite 6.2.8 Snap 2. The error still persists in RHEL 6 and RHEL 7 systems.

-bash-4.1# foreman-rake hosts:scan_out_of_sync
/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.102/app/models/katello/ping.rb:7: warning: previous definition of PACKAGES was here
rake aborted!
LoadError: cannot load such file -- net/ping/external
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/usr/share/foreman/lib/tasks/hosts.rake:24:in `block (2 levels) in <top (required)>'
Polyglot::PolyglotLoadError: Failed to load net/ping/external using extensions deface, rb
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:55:in `load'
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:68:in `rescue in require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
/usr/share/foreman/lib/tasks/hosts.rake:24:in `block (2 levels) in <top (required)>'
Tasks: TOP => hosts:scan_out_of_sync
(See full trace by running task with --trace)

Comment 11 Daniel Lobato Garcia 2017-02-22 11:51:06 UTC
I will submit a merge request to foreman-packaging with the missing package.

Comment 13 jcallaha 2017-02-28 20:48:36 UTC
Verified in Satellite 6.2.8 Snap 4

-bash-4.1# rpm -qa | grep net-ping
tfm-rubygem-net-ping-2.0.1-1.el6sat.noarch
-bash-4.1# foreman-rake hosts:scan_out_of_sync
/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
Conflict IP address for shortname1.full.fqdn.com
x.
All out of sync hosts exist in DNS

Found 1 offline hosts:
Name                                    Environment         Last Report
********************************************************************************
shortname1.full.fqdn.com                production          23 Feb 20:00

Found 1 online hosts which are not reporting back:
Name                                    Environment         Last Report
********************************************************************************
ibm-x3550m3-12.lab.eng.brq.redhat.com   production          28 Feb 20:21




-bash-4.2# foreman-rake hosts:scan_out_of_sync
/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
..Host ibm-x3550m3-09.lab.eng.brq.redhat.com does not have an IP in Foreman. It resolved to IP: '10.34.36.133' through DNS. Skipping...

All out of sync hosts exist in DNS

Found 2 online hosts which are not reporting back:
Name                                    Environment         Last Report
********************************************************************************
hp-dl580pgen8-01.khw.lab.eng.bos.redhat.comproduction          17 Dec 17:22
sat-qe-1.rhq.lab.eng.bos.redhat.com     production          28 Feb 20:31

Comment 14 Bryan Kearney 2017-03-06 15:12:26 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/RHBA-2017:0447


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