Bug #1924
Device "lo:0" does not exist
| Status: | Closed | Start date: | 01/31/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | library | |||
| Target version: | 1.5.4 | |||
| Keywords: | Affected Facter version: | |||
| Branch: | ||||
| Votes: | 0 |
Description
I have a number of systems that have multiple loopback interfaces. Just installed 1.5.3 on one of them and facter gives the following errors on starting: Device “lo:1” does not exist. Device “lo:0” does not exist. Device “lo:0” does not exist. Device “lo:0” does not exist. Device “lo:1” does not exist. Device “lo:1” does not exist. Device “lo:0” does not exist. Device “lo:1” does not exist. Device “lo:1” does not exist. Device “lo:0” does not exist.
It does list these in the interfaces, ipaddress, netmask, & network, but not lo Looks like there is an filter for lo but not aliases for it.
History
Updated by James Turnbull over 3 years ago
- Category set to library
- Status changed from Unreviewed to Needs More Information
- Assignee set to James Turnbull
Platform? OS? etc? Can you run with —debug and include output too thanks.
Updated by snemetz - over 3 years ago
- File facter-1.5.3.debug added
Found the problem in ip.rb
if interface != “lo” && interface != “lo0”
Can this be changed to
if interface ~= /lo[0:]?\d?/
or something a bit better without breaking anything on another OS?
This is our own dialect of CentOS 4. Nothing at the network layer should be different from CentOS 4.
Updated by Luke Kanies over 3 years ago
- Target version set to 1.5.4
Updated by snemetz - over 3 years ago
Look like I spoke too soon. Editing that line probably needs to be done, but it does not clear up the error.
Short term, I’m going to look at adding a filter to not process any loopback interface.
Updated by James Turnbull over 3 years ago
- Status changed from Needs More Information to Closed
Pushed in commit:b85ab0a894f84b6c2211c42898b5b2f127ccb930 in branch master.
Updated by James Turnbull over 3 years ago
snmemetz – I didn’t use your fix.
Signed-off-by: James Turnbull--- CHANGELOG | 2 ++ lib/facter/util/ip.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4719b40..346b9e6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,6 @@ 1.5.3: + Fixed #1924 - Fixed lo / lo:0 local interface matching + Added network fact Fixed #1870 - Format all subnet masks as human-readable diff --git a/lib/facter/util/ip.rb b/lib/facter/util/ip.rb index 6c01033..d4ea123 100644 --- a/lib/facter/util/ip.rb +++ b/lib/facter/util/ip.rb @@ -123,7 +123,7 @@ module Facter::Util::IP else output_int = get_single_interface_output(interface) - if interface != "lo" && interface != "lo0" + if interface != /^lo[0:]?\d?/ output_int.each do |s| if s =~ regex value = $1 -- 1.6.0.6
It’s fixed in this patch.