Issue #9059 has been reported by Thomas Lee.

----------------------------------------
Bug #9059: Facter v1.5.9 incorrectly identifies VMware Server host as a VM
https://projects.puppetlabs.com/issues/9059

Author: Thomas Lee
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Keywords: vmware vmware_server virtual is_virtual
Branch: 
Affected Facter version: 1.5.9


I searched through the existing issues and couldn't find this one, so please 
forgive me if I'm just not using the bug tracker correctly, which is quite 
possible.

I've got machines running VMware Server 1.0.10-203137 on Redhat Enterprise 
Linux 5.7.  One of them was installed a few months ago and has Facter 1.5.7, 
but the newer one, installed last week, has Facter 1.5.9 (both are from EPEL, 
but one hasn't been updated recently).  Oddly, though, Facter 1.5.7 correctly 
gives `is_virtual => false`, while Facter 1.5.9 gives me `is_virtual => true`.

I think the difference is near the end of 
`/usr/lib/ruby/site_ruby/1.8/facter/virtual.rb`, when deciding what to output 
for `is_virtual` based on the value of `virtual`.  

v1.5.7, line 74:
        case Facter.value(:virtual)
        when "xenu", "openvzve", "vmware"
            true
        else 
            false
        end

v1.5.9, line 115:
        if Facter.value(:virtual) != "physical" && Facter.value(:virtual) != 
"xen0"
            "true"
        else
            "false"
        end

In both cases `virtual => 'vmware_server'`.  However, while the above code from 
Facter v1.5.7 correctly returns false in this case, the v1.5.9 code doesn't 
take vmware_server into account and returns true because `virtual` is neither 
"physical" nor "xen0".  I might suggest an addition of `&& 
Facter.value(:virtual) != "vmware_server"`, but there might be a better way to 
do this; I'm not an expert in the ins and outs of Facter's code.


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