Issue #7559 has been updated by Ryan Coleman.

Josh Cooper wrote:
> Ryan Coleman wrote:
> > Would it help to make this fact a module that is distributed through the 
> > Puppet Forge instead of making a part of core Facter? Those running in EC2 
> > can install the module and pluginsync the fact to their agents.
> 
> It would for puppet, but facter runs in environments without puppet...

Ok, fair enough but it would solve a part of the problem without preventing 
other parts from being solved, right? I'm trying to fight the feeling I have 
that we're all aiming for a solution that's just a bit too perfect.
----------------------------------------
Feature #7559: Fact for identifying Amazon VPC instances.
https://projects.puppetlabs.com/issues/7559#change-78404

Author: Nigel Kersten
Status: Accepted
Priority: Normal
Assignee: 
Category: library
Target version: 
Keywords: vpc ec2 arp
Branch: 
Affected Facter version: 1.6.10


(From the list)

 I ran into a buglet in facter 1.5.9rc6 (from tmz repo).  In normal AWS
instances it works great.  In VPC instances if doesn't work.  This seems
to be because VPC instances don't use the fe:ff:ff:... MAC addresses.

<pre>
/sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 02:67:4E:E1:26:30
         inet addr:172.17.129.24  ...


/sbin/arp
Address          HWtype  HWaddress          Flags  Mask  Iface
169.254.169.253  ether   02:67:4E:C0:00:01  C      eth0
172.17.128.1     ether   02:67:4E:C0:00:01  C      eth0


/sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 02:67:4E:DA:58:16
         inet addr:172.17.128.126

/sbin/arp
Address          HWtype  HWaddress          Flags  Mask  Iface
169.254.169.253  ether   02:67:4E:C0:00:01  C      eth0
172.17.128.1     ether   02:67:4E:C0:00:01  C      eth0
</pre>


Of the two VPC EC2 instances I've seen, the MAC address always start
with 02:67:4E.  I have only seen two instances, both in the same VPC, so
I don't know if this holds for every VPC instance, YMMV.


in ec2.rb , the following seemed to work:
<pre>
def has_euca_mac?
 !!(Facter.value(:macaddress) =~ %r{^02:67:4[eE]:})
end
</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 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