Bug #17837

foreman-rake hosts:scan_out_of_sync fails with "LoadError: cannot load such file -- ping"

Added by Daniel Lobato Garcia about 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:rake tasks
Target version:-
Difficulty: Bugzilla link:1408184
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4127
Story points-
Velocity based estimate-
Release1.15.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1408184
Description of problem:

On Satellite v 6.2.5 below rake task fails with error:

  1. 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:

Associated revisions

Revision 0f791ba5
Added by Daniel Lobato Garcia about 1 year ago

Fixes #17837 - Fix hosts:scan_out_of_sync task

The task relies on Ping, which was removed since Ruby 1.9. I've moved it
to rely on net-ping instead. Notice the ping now relies on the 'ping'
binary being in the foreman user path for this to work with foreman-rake

Revision df0458f2
Added by Dominic Cleal about 1 year ago

refs #17837 - require net-ping

History

#1 Updated by Dominic Cleal about 1 year ago

  • Category set to rake tasks

#2 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/4127 added

#3 Updated by Anonymous about 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal about 1 year ago

  • Release set to 1.15.0

Also available in: Atom PDF