Bug #888
Facter (ipmess.rb) truncating Xen virtual interfaces
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - | |||
| Affected Puppet version: | 0.24.7 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
Facter 1.3.8 has a module called ipmess.rb that does not handle interface names with decimals, hence Xen virtual interfaces names get truncated. Therefore, dubious errors are displayed when ipmess.rb goes to do an ifconfig on interface vif3 instead of vif3.0.
Example: Output of ifconfig -a to show Xen virtual interfaces
# ifconfig -a (output has been shorten for brevity)
vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
BROADCAST MULTICAST MTU:1500 Metric: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 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vif0.2 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
BROADCAST MULTICAST MTU:1500 Metric: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 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vif0.3 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
BROADCAST MULTICAST MTU:1500 Metric: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 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Output to show facter version and errors # facter -v vif0: error fetching interface information: Device not found vif0: error fetching interface information: Device not found vif0: error fetching interface information: Device not found vif0: error fetching interface information: Device not found vif1: error fetching interface information: Device not found vif2: error fetching interface information: Device not found vif3: error fetching interface information: Device not found vif7: error fetching interface information: Device not found 1.3.8
Proposed patch:
*** ipmess.rb 2007-09-24 03:00:05.000000000 -0400
--- /tmp/ipmess.rb 2007-11-04 17:00:44.000000000 -0500
***************
*** 21,27 ****
output = %x{/sbin/ifconfig -a}
int = nil
! output.scan(/^(\w+)(\d+)/) { |str|
output_int = %x{/sbin/ifconfig #{str}}
int = "#{str}"
tmp1 = nil
--- 21,27 ----
output = %x{/sbin/ifconfig -a}
int = nil
! output.scan(/^(\w+)(\d+)(\.?)(\d+)*/) { |str|
output_int = %x{/sbin/ifconfig #{str}}
int = "#{str}"
tmp1 = nil
History
Updated by James Turnbull over 4 years ago
- Status changed from 1 to Closed
- 7 set to duplicate
Agree there is an issue. Have moved bug to Facter trac and re-created.
Updated by micah - about 3 years ago
- Affected Puppet version set to 0.24.7
James Turnbull wrote:
Agree there is an issue. Have moved bug to Facter trac and re-created.
For others looking for where this is, its located “here”:http://projects.reductivelabs.com/issues/1321