Bug #2078

ip.rb errors command not found

Added by Ivo van der Meer over 1 year ago. Updated over 1 year ago.

Status:Closed Start:03/16/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:library
Target version:1.5.5
Keywords:facter, ip.rb Branch:
Votes: 0

Description

When running puppet or facter from command line on FreeBSD I get the following error:

$ facter /usr/local/lib/ruby/site_ruby/1.8/facter/util/ip.rb:145: command not found:

Puppet still works, but I’m not sure what the impact is for this error.

144     def self.get_network_value(interface)
145         require 'ipaddr'
146
147         ipaddress = get_interface_value(interface, "ipaddress")
148         netmask = get_interface_value(interface, "netmask")
149
150         if ipaddress && netmask
151             ip = IPAddr.new(ipaddress, Socket::AF_INET)
152             subnet = IPAddr.new(netmask, Socket::AF_INET)
153             network = ip.mask(subnet.to_s).to_s
154         end
155     end

History

Updated by James Turnbull over 1 year ago

  • Category set to library
  • Status changed from Unreviewed to Needs more information
  • Target version changed from 1.5.4 to 1.6.0

I suspect this means ‘ipaddr’ is not available on FreeBSD. I thought this was a default Ruby library? Perhaps not on FreeBSD?

Try:

ruby -ripaddr -e 'puts :yep'

Updated by Ivo van der Meer over 1 year ago

Hi,

I’ve tested you command on 2 versions of FreeBSD I use:


[root@druoda /data/puppet/manifests]# ruby -ripaddr -e ‘puts :yep’ yep [root@druoda /data/puppet/manifests]# uname -a FreeBSD druoda.kabelfoon.intern 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed Mar 7 11:23:07 CET 2007 ivdmeer@druoda.kabelfoon.intern:/usr/obj/usr/src/sys/CN i386 [root@druoda /data/puppet/manifests]# pkg_info |grep ruby ruby-1.8.6.287,1 An object-oriented interpreted scripting language ruby18-bdb-0.6.4 Ruby interface to Sleepycat’s Berkeley DB revision 2 or lat

ruby18-ldap-0.9.7_1 Ruby interface to LDAP API based on RFC1823

[ivdmeer@benthan ~]$ ruby -ripaddr -e ‘puts :yep’ yep [ivdmeer@benthan ~]$ uname -a FreeBSD benthan.kabelfoon.intern 7.1-STABLE FreeBSD 7.1-STABLE #0: Wed Feb 4 17:13:53 UTC 2009 root@benkaran.kabelfoon.intern:/usr/obj/usr/src/sys/CN i386 [ivdmeer@benthan ~]$ pkg_info |grep ruby ruby-1.8.6.287,1 An object-oriented interpreted scripting language ruby18-bdb-0.6.4 Ruby interface to Sleepycat’s Berkeley DB revision 2 or lat [ivdmeer@benthan ~]$ pkg_info |grep facter facter-1.5.4 A cross-platform Ruby library for retrieving facts from OS [ivdmeer@benthan ~]$ pkg_info |grep puppet

puppet-0.24.7 A configuration management framework written in Ruby

Ik hope this helps.

Kind regards,

Ivo van der Meer

Updated by James Turnbull over 1 year ago

  • Status changed from Needs more information to Closed

Fixed in commit:“89a3aa8097c2e4690c835905dec49df2bc333b30” in branch master.

Updated by Nicolas Szalay over 1 year ago

  • Status changed from Closed to Re-opened

I get the same error. ipaddr is available on my system.

Feel free to /query nico me if you need more informations

Updated by Peter Meier over 1 year ago

nico wrote:

I get the same error. ipaddr is available on my system.

Feel free to /query nico me if you need more informations

version? did you apply the patch?

Updated by Luke Kanies over 1 year ago

  • Status changed from Re-opened to Closed

I clarified with nico on IRC that he hasn’t tested it with the patch.

Updated by James Turnbull over 1 year ago

  • Target version changed from 1.6.0 to 1.5.5

Also available in: Atom PDF