[Pkg-puppet-devel] Bug#725684: AWS VPC not supported by facter-1.7.1

Cedric Jeanneret debian-bugs at tengu.ch
Mon Oct 7 12:23:35 UTC 2013


Package: facter
Version: 1.7.1
severity: important

When we run facter in a freshly Amazon VPC instance, it doesn't get the ec2_* facts as it should.

Problem seems to be located in Facter::Util::EC2.has_ec2_arp function: it checks the instance MAC address, which is predictable on "non-VPC" instances (fe:ff:ff:ff:ff:ff), but not on VPC instances, as they do have a "real" MAC address.

My tests seem to show the generated MAC has this "root": 12:ea:49:c0

This means we should be able to modify util/ec2.rb like this:

--- ec2.rb.ori  2013-10-07 14:06:14.391700848 +0200
+++ ec2.rb      2013-10-07 08:58:28.690642654 +0200
@@ -40,9 +40,9 @@

       mac_address_re = case kernel
                        when /Windows/i
-                         /fe-ff-ff-ff-ff-ff/i
+                         /(fe-ff-ff-ff-ff-ff|12-ea-49-c0)/i
                        else
-                         /fe:ff:ff:ff:ff:ff/i
+                         /(fe:ff:ff:ff:ff:ff|12:ea:49:c0)/i
                        end

       arp_command = case kernel

Or, maybe, we can ignore this check… MAC address isn't the best way to test this kind of stuff, the Facter::Util::EC2.can_connect should be sufficient…



More information about the Pkg-puppet-devel mailing list