Issue #14366 has been updated by Jeff McCune.

Jeremy Brake wrote:
> Hi Jeff, I'm seeing the same issue under Centos6 with 2.6 kernel (still 
> broken in 6.17), but am not in a position to run the latest version of 
> Puppet, and therefore facter. 
> Is there a way to work around this (ideally in Puppet-2.6.7) by strategically 
> overriding with custom facts, applied to known AWS instances and/or by 
> exporting all of the ec2 and vpc facts to an external facts config and 
> removing the dependancies?

What version of Facter are you running?  I tested this custom fact with Facter 
1.6.7

If you put this into a module's `lib/facter/virtual.rb` and make sure that only 
your EC2 hosts activate this code via pluginsync or otherwise, then you can 
override facter entirely:

<pre>
require 'facter/util/ec2'

# Override EC2 facts for earlier versions of Puppet
# @see https://projects.puppetlabs.com/issues/14366#note-11
Facter.add("virtual") do
  has_weight 1000
  setcode { "xenu" }
end

Facter.add("is_virtual") do
  has_weight 1000
  setcode { true }
end
</pre>

With this fact here's what I get while running 1.6.7 in a VPC:

<pre>
$ bundle exec facter | grep virtual
is_virtual => true
virtual => xenu
</pre>

Hope this helps,
-Jeff
----------------------------------------
Bug #14366: virtual => physical and is_virtual => false on EC2
https://projects.puppetlabs.com/issues/14366#change-81894

Author: Kevin O'Connor
Status: Needs More Information
Priority: Normal
Assignee: Jeff McCune
Category: cloud - ec2
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.6.8


As described:

    [root@production-web-d95fb6bf ~]# facter | grep -i virtual
    ec2_profile => default-paravirtual
    is_virtual => false
    virtual => physical
    [root@production-web-d95fb6bf ~]# facter --version
    1.6.8
    [root@production-web-d95fb6bf ~]# cat /etc/*-release
    Amazon Linux AMI release 2012.03

is_virtual should be true, right?


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to