Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Eric Thompson updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Eric Thompson QA Status: Reviewed Add Comment This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Eric Thompson updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Eric Thompson {code} # facter/usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a/usr/bin/facter:54: command not found: /sbin/ifconfig -a/usr/bin/facter:54: command not found: dnsdomainname/usr/bin/facter:54: command not found: domainname/usr/bin/facter:54: command not found: /sbin/ifconfigarchitecture => i386domain => internal.HIDDENfacterversion => 1.3.8fqdn => ruby-test.internal.HIDDENhardwareisa => unknownhardwaremodel => i686hostname => ruby-testid => rootipaddress => 10.200.201.73 {code} It would be nice if when ifconfig can't be found, it falls back to using 'ip addr' (or the other way around) - also, notice that domainname and dnsdomainname are not present on this system - however facter does appear to get them correct regardless. Add Comment This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Kylo Ginsberg commented on FACT-184 Re: Using 'ip addr' over ifconfig Fabrice Bacchella: facter 3.0 was released and is packaged with the last few puppet-agent builds: https://groups.google.com/forum/#!topic/puppet-users/gnUUUIZcdVo Add Comment This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Fabrice Bacchella commented on FACT-184 Re: Using 'ip addr' over ifconfig You don't intent to fixe it until facter 3 is out ? The current interfaces fact implementation is broken in many way : it still uses ifconfig, which is broken in linux since years it launch ifconfig in a wrong way: "sh", "-c", "/sbin/ifconfig -a 2>/dev/null", why fork a shell for that ? it's result are wrong, because ifconfig is deprecated, and ifconfig confuse interfaces and ip address, On a RHEL7, if you have two IP on the same interface, ifconfig gives : bond0: flags=5187 mtu 1500 ... bond0:git: flags=5187 mtu 1500 ... But ip link list, /proc/net/dev, snmp only see bond0, so the bond0_git interface is unusable in many ways. Add Comment
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Kylo Ginsberg updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Kylo Ginsberg Fix Version/s: FACT 3.0.0 Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Michael Smith commented on FACT-184 Re: Using 'ip addr' over ifconfig I understand the bug. My concern is with the ubiquity of the 'ip' command, which I'm simply unfamiliar with. According to http://linux.die.net/man/8/ip it was added in Linux 2.2, so I suppose it's everywhere we need it to be. Matthaus Owens, can you weigh in on this change? Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Kristyna Streitova commented on FACT-184 Re: Using 'ip addr' over ifconfig Sorry, I didn't realize you cannot access this bug. The problem is with interfaces with long names. Suppose we have an interface called "HelloHowAreYou": Creating interface with a long name: testuser@linux-ouro:~> sudo /sbin/tunctl -u testuser -t HelloHowAreYou Set 'HelloHowAreYou' persistent and owned by uid 1000 Now if "ifconfig" is used then facter gets a wrong (shortened) interface name "HelloHowA" testuser@linux-ouro:~> /sbin/ifconfig -a HelloHowA Link encap:Ethernet HWadr C2:8B:C6:D2:D9:4D VŠESMĚROVÉ_VYSÍLÁNÍ MULTICAST MTU:1500 Metrika:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 délka odchozí fronty:500 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) If "ip link" would be used then facter gets a full interface name "HelloHowAreYou" testuser@linux-ouro:~> ip link 4: HelloHowAreYou: mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 500 link/ether c2:8b:c6:d2:d9:4d brd ff:ff:ff:ff:ff:ff Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Michael Smith commented on FACT-184 Re: Using 'ip addr' over ifconfig Thank you for the patch Kristyna Streitova. This should be fixed in Facter 3, as we call OS APIs directly; can you provide an example of what created the problem you were fixing so we can confirm that? I have some concerns about breaking older LInux versions by changing to only trying `ip link`. I'll give further feedback in the PR, but we may be able to incorporate this for Facter 2.4. Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Michael Smith updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Michael Smith Scrum Team: Client Platform Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Kristyna Streitova updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig We encountered this bug (https://bugzilla.novell.com/show_bug.cgi?id=878129) and created a patch which use "ip link" instead of "ifconfig" for interface names. So I'm sending this patch to you. Change By: Kristyna Streitova Attachment: facter-ip-interface.patch Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Eugene Vilensky commented on an issue Re: Using 'ip addr' over ifconfig ifconfig is in the EL7 package 'net-tools' which is not part of the core/minimal install. It would be useful to rely on ip commands instead. Add Comment Facter / FACT-184 Using 'ip addr' over ifconfig # facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => int... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Patrick Hemmer commented on an issue Re: Using 'ip addr' over ifconfig For anyone else interested, this is the custom fact I'm using to get the proper IP: Facter.add(:ip) do confine :kernel => :linux setcode do default_route_line = %x{ip route}.split("\n").find{|l| l.match(/^default /)} if default_route_line then default_gw = default_route_line.match(/ via (\S+)/)[1] ip = %x{ip route get #{default_gw}}.match(/ src (\S+)/)[1] else ip = %x{ip addr}.match(/inet ([^\/]+).* scope global/)[1] end end end Unfortunately it had to be called ip. You can't call it ipaddress as custom facts don't override built-in facts. And it can't be called ipaddr as it then causes issues with the ruby IPAddr built-in class. This will get the IP address the system uses by default. If the system has more than one default route, it will pick the first one. If the system has no default route, it will pick the first global scope address (address reachable by other hosts). If the system has no global scope address, it will error (easy to modify, but didn't think worth it). Add Comment Facter / FACT-184 Using 'ip addr' over ifconfig # facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => int...
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Klaus Slott commented on an issue Re: Using 'ip addr' over ifconfig A OpenSUSE in a VMware environment generates very long interface names like 'eno16777984', ifconfig only outputs 'eno167779'. This breaks puppets knowledge about interfaces and /var/log/messages is now spammed with several 'Device "eno167779" does not exist.' on every run. Add Comment Facter / FACT-184 Using 'ip addr' over ifconfig # facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => int... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Gerrard Geldenhuis commented on an issue Re: Using 'ip addr' over ifconfig I don't think there is any valid argument any more for using ifconfig as default. ifconfig has been marked as deprecated for quite a while and we all should really just use ip and so should facter. That being said I have yet to get into the habit of using ip myself. Add Comment Facter / FACT-184 Using 'ip addr' over ifconfig # facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => int... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Jason Antman commented on an issue Re: Using 'ip addr' over ifconfig I'll vote for this one, confirmed on current Arch linux. Not sure if I'll really have the time to submit a patch though. IMO the safest solution (not necessarily the best) would be to fall back to using "ip addr" if ifconfig isn't available. Most purists or people working on modern distros would probably say that ifconfig should be the fallback. Add Comment Facter / FACT-184 Using 'ip addr' over ifconfig # facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => int... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegrou
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Adam Stephens commented on an issue Re: Using 'ip addr' over ifconfig This issue is bigger than the OP's description, as evidenced by the number of 'relates to' tickets from redmine. For me, the use of ifconfig leaves facter blind to iproute configured IP addresses. For others, including archlinux, there is no ifconfig on the default base install. Add Comment Facter / FACT-184 Using 'ip addr' over ifconfig # facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => int... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.go
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Mark Jeromin updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Mark Jeromin Assignee: Mark Jeromin Eric Sorenson Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Mark Jeromin updated an issue Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Mark Jeromin Issue Type: Bug Improvement Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title Mark Jeromin assigned an issue to Mark Jeromin I cannot reproduce exactly as described by the OP in either Puppet 2.7.25 or Puppet 3.4.2 on CentOS 6.4. However, after renaming the /sbin/ifconfig, facter fails to output values for interfaces, ipaddress*, macaddress*, mtu*, and netmask* facts. The ipaddress fact can be mitigated by adding an entry to /etc/hosts. Facter / FACT-184 Using 'ip addr' over ifconfig Change By: Mark Jeromin Assignee: Eric Sorenson Mark Jeromin Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (FACT-184) Using 'ip addr' over ifconfig
Title: Message Title redmine.exporter created an issue Facter / FACT-184 Using 'ip addr' over ifconfig Issue Type: Bug Assignee: Eric Sorenson Created: 03/Jan/14 5:59 AM Labels: redmine Priority: Normal Reporter: redmine.exporter facter /usr/lib/ruby/site_ruby/1.8/facter/ipmess.rb:85: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: /sbin/ifconfig -a /usr/bin/facter:54: command not found: dnsdomainname /usr/bin/facter:54: command not found: domainname /usr/bin/facter:54: command not found: /sbin/ifconfig architecture => i386 domain => internal.HIDDEN facterversion => 1.3.8 fqdn => ruby-test.internal.HIDDEN hardwareisa => unknown hardwaremodel => i686 hostname => ruby-test id => root ipaddress => 10.200.201.73 It would be nice if when ifconfig can't be found, it falls back to using 'ip addr' (or the other way around) - also, notice that domainname and dnsdomainname are not present on this system - however facter does appear to get them correct regardless.