| Hi Tim Meusel, I investigated this issue a bit more and I was in favor of it initially. However, I think it's a bit of a grey area. The code involving getpid is quite primitive, and the fix is not as simple as enclosing the service name between ^ and $. Since we're parsing the output of ps -ef, processes can show up in a variety of ways. Here are some EL 6 examples: Service: abrtd ps output: root 6509 1 0 09:35 ? 00:00:00 /usr/sbin/abrtd Service: syslog ps output: root 1671 1 0 09:35 ? 00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5 Service: rpcbind ps output: rpc 1723 1 0 09:35 ? 00:00:00 rpcbind I think messing with the check by trying to more closely match the process name could open up a whole can of worms (some processes have arguments, others run under an absolute path). I agree that the current behavior is a bit counterintuitive, but it does work the way it's documented:
As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the `ps` fact. The default search pattern is the name of the service, but you can specify it with the `pattern` attribute.
https://puppet.com/docs/puppet/6.18/types/service.html#service-description |