Issue #6447 has been updated by konrad rzentarzewski. Assignee changed from konrad rzentarzewski to Nigel Kersten
in service type, getpid method uses "ps" to get a pid of running process in default provider. by default it searches for string equal to either service binary or name. "ps -ef" (as given by facter) is used to get process table. now consider service foo, running by user bar and service bar running by user baz. if foo service is running and bar service is not, puppet will return that both services are running, because in process table foo service consist substring "bar" - username under which process is running. expected behaviour is to return running only services which are actually running. is it clear now? ---------------------------------------- Bug #6447: ps -ef is parsed incorrectly by service/base.rb (trivial bug) https://projects.puppetlabs.com/issues/6447 Author: konrad rzentarzewski Status: Needs More Information Priority: Normal Assignee: Nigel Kersten Category: service Target version: Affected Puppet version: 0.25.5 Keywords: Branch: regex matches ps -ef output in any place, resulting false positives when username coincides with process name, ie. debug: Service[nagios](provider=redhat): Executing 'ps -ef' debug: Service[nagios](provider=redhat): PID is 13873 <0>root@893(13)/usr/lib/ruby/site_ruby/1.8/puppet$ ps -ef|grep 13873 nagios 13873 1 0 14:20 ? 00:00:00 nrpe -c /etc/nagios/nrpe.cfg -d root 20625 20304 0 15:29 pts/1 00:00:00 grep 13873 process nagios is obvously mistaken with user nagios. service type keeps calling *service nagios stop*, while it's not running. either fix regex or change to "ps -efn" workaround `export FACTER_ps="ps -efn"` doesn't work. -- 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.
