Issue #10490 has been updated by Ken Barber.

Status changed from In Topic Branch Pending Review to Tests Insufficient
Assignee set to Stefan Schulte

Full comments in pull request - but I've asked Stefan to add an example for the 
venet0 invalid/zeroed out mac address case as well, not just 'no mac address' 
cases.

If your happy with this and you make the change just flick the status back and 
I'll be happy to re-review and merge :-).
----------------------------------------
Bug #10490: macaddress fact errors when no macadress can be found
https://projects.puppetlabs.com/issues/10490

Author: Stefan Schulte
Status: Tests Insufficient
Priority: Normal
Assignee: Stefan Schulte
Category: library
Target version: 1.6.x
Keywords: 
Branch: https://github.com/stschulte/facter/tree/ticket/1.6.x/10490
Affected Facter version: 


In `lib/facter/macaddress.rb` facter runs `ifconfig -a` on Linux and returns 
the first occurrence of the following regex as the macaddress

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

But facter does not handle the case where none of the printed lines actually 
match the regular expression. E.g. (taken from #10392)
<pre>
# /sbin/ifconfig -a |egrep 'ether|HWaddr'
venet0    Link encap:UNSPEC  HWaddr 
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
venet0:0  Link encap:UNSPEC  HWaddr 
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
</pre>

Actual error message
<pre>
Could not retrieve macaddress: private method split' called for nil:NilClass
</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://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