Sorry -- I just found this thread. I am from Cloud Linux Inc.
The best way to detect if CL is running is to check for file /proc/lve/
list

And yes -- I hate this hack with /etc/redhat-release as well -- we had
to do it so that it would work with control panels like cPanel, etc...
but it is pretty much no longer done.

On Aug 28, 1:59 pm, [email protected] wrote:
> Issue #6728 has been updated by James Turnbull.
>
> Category set to library
>
> ----------------------------------------
> Bug #6728: Facter improperly detects openvzve on CloudLinux 
> systemshttps://projects.puppetlabs.com/issues/6728
>
> Author: MaxiM Basunov
> Status: In Topic Branch Pending Merge
> Priority: High
> Assignee: Ben Hughes
> Category: library
> Target version: 1.6.x
> Keywords:
> Branch:https://github.com/barn/facter/tree/ticket/next/6728-facter_improperl...
> Affected Facter version:
>
> 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