Issue #6728 has been updated by Ken Barber.

Status changed from In Topic Branch Pending Merge to Merged - Pending Release
Keywords set to openvz
Affected Facter version set to 1.6.1


----------------------------------------
Bug #6728: Facter improperly detects openvzve on CloudLinux systems
https://projects.puppetlabs.com/issues/6728

Author: MaxiM Basunov
Status: Merged - Pending Release
Priority: High
Assignee: Ben Hughes
Category: library
Target version: 1.6.x
Keywords: openvz
Branch: 
https://github.com/barn/facter/tree/ticket/next/6728-facter_improperly_detects_openvzve_on_cloudlinux_systems
Affected Facter version: 1.6.1


Facter 1.5.8 uses following algorithm to diagnose OpenVZ VE:
    def self.openvz?
        FileTest.directory?("/proc/vz")
    end

    def self.openvz_type
        return nil unless self.openvz?
        if FileTest.exists?("/proc/vz/version")
            result = "openvzhn"
        else
            result = "openvzve"
        end
    end

But, since CloudLinux internally based on portions of OpenVZ, then this check 
will fail and improperly report openvzve on CloudLinux hardware node:
Linux localhost.localdomain 2.6.18-294.26.1.el5.lve0.8.18PAE #1 SMP Thu Feb 24 
12:58:52 EET 2011 i686 i686 i386 GNU/Linux
$ ls -l /proc/vz
total 0
$ ls -l /proc/user_beancounters 
-r-------- 1 root root 0 Mar 16 10:35 /proc/user_beancounters

I suggest to check presence of /proc/vz/veinfo in addition to /proc/vz.


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