Issue #2390 has been updated by Alexander Bien.

Luke Kanies wrote:
> Which makes the most sense?  Does your rc script have an appropriate 'status' 
> operation?

I suppose you are talking about puppet's rc script here? If so, then sure. Its 
epel's package.

The following shows the hosts puppet prozess, which is correctly identified 
even though there is >1 process named "puppet"

  [r...@vmserver ~]# /etc/init.d/puppet status
  puppetd (pid 13256) is running...

  [r...@vmserver ~]# ps aux | grep 13256
  root     13256  0.3  3.8  55204 40212 ?        Ssl  Jul03  36:34 
/usr/bin/ruby /usr/sbin/puppetd --server=puppet
  
  [r...@vmserver ~]# vzpid 13256
  Pid     VEID    Name
  13256   0       puppetd

Its all good, here is the other puppetd processes, which are ignored correctly:

  [r...@vmserver ~]# ps aux |grep puppetd
  root     13256  0.3  3.8  55204 40212 ?        Ssl  Jul03  36:34 
/usr/bin/ruby /usr/sbin/puppetd --server=puppet
  root     14407  0.2  3.9  55108 41136 ?        Ss   Jul09   2:55 
/usr/bin/ruby /usr/sbin/puppetd --server=puppet
  root     31484  0.3  3.7  53776 39164 ?        Ssl  Jul05  29:14 
/usr/bin/ruby /usr/sbin/puppetd --server=puppet
  

I dont know if its possible to reduce ps output to only show the hosts 
processed. havent figured that out.

Thanks
Alex
----------------------------------------
Bug #2390: "ensure => running" not working on OpenVZ or similar solutions
http://projects.reductivelabs.com/issues/2390

Author: Alexander Bien
Status: Needs design decision
Priority: Normal
Assigned to: 
Category: service
Target version: 
Complexity: Unknown
Affected version: 0.24.8
Keywords: openvz ensure


I have found the following bug while using OpenVZ/Virtuozzo & puppet. I assume 
it will apply to any other lightweight virtualization that allows the host 
system to see all childs processes. (if there are any other)

When creating a simple recepie like:
<pre>
    service { puppet:
        ensure => running,
        enable => true;
     }
</pre>

puppet will use ps -ef to look for a pid matching the process.
<pre>
    debug: Service[puppet](provider=redhat): Executing 'ps -ef'
    debug: Service[puppet](provider=redhat): PID is 4768
</pre>

This will (under circumstances) not result in the desired action on an OpenVZ 
HOST due to the host seeing all process of all virtual containers.So as long as 
there is another puppet running in any container on this host, the HOST's 
puppet will find the PID, think everything is okay and move on.

Here we see the process that puppet found running and which satisfied our 
earlier "ensure => running":
<pre>
  [r...@vmserver ~]# ps aux | grep 4768 
  root      4768  0.1  1.4  45188 31076 ?        Ssl  17:00   0:03 
/usr/bin/ruby /usr/sbin/puppetd --server=puppet
</pre>

But this process does not belong to the host. In fact it belongs to the Virtual 
Container 206:
<pre>
  [r...@vmserver ~]# vzpid 4768
  Pid     VEID    Name
  4768    206     puppetd
</pre>

The HOST's puppet daemon is not running.
<pre>
  [r...@vmserver ~]# service puppet status
  puppetd is stopped
</pre>

This is actually true for any process/service, not only puppetd.




-- 
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://reductivelabs.com/redmine/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