Issue #888 has been updated by micah -.

Affected 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/888

----------------------------------------
Bug #888: Facter (ipmess.rb) truncating Xen virtual interfaces
http://projects.reductivelabs.com/issues/888

Author: Jason Hartley
Status: Closed
Priority: Normal
Assigned to: community -
Category: 
Target version: 
Complexity: Unknown
Patch: Code
Affected version: 0.24.7
Keywords: 


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
<pre>
# 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)
</pre>
<pre>
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
</pre>  

Proposed patch:
<pre>
*** 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
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to puppet-bugs@googlegroups.com
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to