Issue #1415 has been updated by Michael Renz.

I don't care about the ifconfig versus ip versus sysfs debate.  I (and others 
that use infiniband) just need the correct MAC address for IB interfaces.

This fix uses sys first because it is faster, and since switched from 
File.read, will not hang on any ruby systems that do have the bug.  The 
File.exist check that happens (even /if/ it causes the same hang [which I 
haven't seen on any of our systems]) will only happen on systems with IB 
interfaces.

This has been checked with Puppet Enterprise 2.0.3's Ruby on RHELs 5 and 6 and 
OELs 5 and 6.  Since Mellanox currently only distributes Openfabrics drivers 
for RHEL, OEL, SLES and Xenserver, there is a good chance that this needs to be 
tested for the hang on just SLES and Xenserver.

If the hang is that much of an issue with File.exist (which I am not seeing but 
also do not know which version of Ruby said hang is an issue in), File.exist 
can always be replaced with backticking, or anything else there too.

The enterprises that this fix will directly affect are primarily financials, 
and since Infiniband is such a niche technology, it would surprise me in a very 
major way to find that they do not have a long line of integration and 
performance tests (and most likely automated ones at that) before anything is 
put into production, ESPECIALLY since one of the primary reasons for going to 
IB in the first place is to go from millisecond to microsecond latency.
----------------------------------------
Bug #1415: MAC addresses are truncated for Infiniband
https://projects.puppetlabs.com/issues/1415#change-71352

Author: Thomas Bellman
Status: Investigating
Priority: Normal
Assignee: 
Category: library
Target version: 
Keywords: infiniband interface
Branch: 
Affected Facter version: 


Facter (as of versions 1.3.8 and 1.5.0) assumes that MAC addresses
are always six octets.  That is not always the case, for example
if you have Infiniband interfaces:

<pre>
# ifconfig ib0
ib0       Link encap:InfiniBand  HWaddr 
80:00:00:48:FE:80:00:00:00:00:00:00:00:00:00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:2044  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:256
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
</pre>

Facter truncates that address to six octets:

<pre>
# pwd
/root/facter-1.5.0
# RUBYLIB=lib bin/facter | grep macaddress_ib0
macaddress_ib0 => 80:00:00:48:FE:80
</pre>

The problem lies in the regexp parsing the output from ifconfig,
in lib/facter/macaddress.rb and in lib/facter/util/ip.rb:

<pre>
/(?:ether|HWaddr) (\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/
</pre>

for Linux, and slight variations for *BSD and SunOS.  It would
probably be better to use

<pre>
    /(?:ether|HWaddr) ((\w{1,2}:){5,}\w{1,2})/
</pre>
for this.



-- 
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://projects.puppetlabs.com/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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to