Issue #16278 has been updated by Avi Miller.

Ok, there is a difference between the XenU detection code in the Facter version 
in the Puppet Labs EL5 repo and the stuff that's coming from Ubuntu. If you 
check the old code:

    if Facter::Util::Virtual.xen?
      if FileTest.exists?("/proc/xen/xsd_kva")
        result = "xen0"
      elsif FileTest.exists?("/proc/xen/capabilities")
        result = "xenu"
      end
    end

This will not work on PV-OPS kernel. However, when I check the version from 
Ubuntu:

        if Facter::Util::Virtual.xen?
            # new Xen domains have this in dom0 not domu :(
            if FileTest.exists?("/proc/sys/xen/independent_wallclock")
                result = "xenu"
            end
            if FileTest.exists?("/sys/bus/xen")
                result = "xenu"
            end

            if FileTest.exists?("/proc/xen/capabilities")
                txt = Facter::Util::Resolution.exec("cat 
/proc/xen/capabilities")
                if txt =~ /control_d/i
                    result = "xen0"
                end
            end
        end

This works just fine on OL5-UEK2 guests. Not sure why the version of Facter in 
your EL5 repo isn't up-to-date.
----------------------------------------
Feature #16278: Add support for Oracle VM detection
https://projects.puppetlabs.com/issues/16278#change-72848

Author: Ken Johnson
Status: Accepted
Priority: High
Assignee: eric sorenson
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 


Currently guests under Oracle VM Server are detected as physical machines and 
return false for the is_virtual fact. A customer has asked us to put in a 
feature request to add support for detecting this virtual environment properly. 
Some additional details about the environment the customer is running are below:

"To be specific, where this needs improvement is when using Oracle Linux 5.8 on 
top of Xen PVM VMs on Oracle VM Server for x86. In Oracle Linux 5.8, the 
Unbreakable
Enterprise Kernel becomes the default and it bakes Xen support into the kernel 
rather than having a separate kernel. We did some additional testing this 
morning and it looks like we do not see this issue with the Red Hat compatible 
“-xen” kernel."

Some sample output for the relevant facts on their test VM:

[root@racvm0 ~]# facter is_virtual
false
[root@racvm0 ~]# facter virtual
physical
[root@racvm0 ~]# uname -r
2.6.39-200.29.3.el5uek


-- 
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