Issue #2390 has been updated by Luke Kanies.

Category set to service
Status changed from Unreviewed to Needs design decision

I see two possible fixes here:  Update our usage of 'ps' so it adds a flag to 
only show processes in the local VM (which I assume is possible), or update the 
rc script so it does this.

Which makes the most sense?  Does your rc script have an appropriate 'status' 
operation?
----------------------------------------
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