Am Dienstag, 22. Mai 2018 16:37:37 UTC+2 schrieb jcbollinger: > > > > On Tuesday, May 22, 2018 at 1:38:08 AM UTC-5, Thomas Müller wrote: >> >> Hi >> >> If I define: >> >> exec { '/bin/sleep 300 &': >> timeout => 10, >> } >> >> and run it with puppet apply: it happily starts the sleep, backgrounds it >> and finishes - leaving the sleep in the background alive. >> >> Is this behaviour as expected? >> > > > It's what *I* would have expected, at any rate. > > > >> I personally expected that puppet would ensure all started processes are >> killed if once the exec resource finishes. >> > > > I'm not sure why someone would expect that. >
the puppet-agent service runs for longer time in the background. Processes could leak unintended . It's not only about procesces backgrounded by the Exec directly but also about subprocesses started by the exec command. Like: exec { '/bin/bash -c "sleep 300 &"': timeout => 10, } if this is the expected behaviour then all is fine. I just was suprised one can start "daemon" processes with puppet exec. I was already thinking about using systemd oneshot+time units to run puppet instead of the service because of the SELinux fcontext issue with the service . Another plus would be that systemd could ensure leftover processes started in the background will be treated. - Thomas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/472f95ef-6d52-461a-9083-be3d5856203e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.