That is not surprising to me. To provide maximal flexibility, puppet does
not do any management or cleanup of processes started. As an exercise, try
to define a parameter to exec that specifies how puppet should cleanup
processes after exec: as soon as the exec returns? when the agent run ends?
everything in the control group, or just non-detached processes?

Better to use a proper/any process manager (systemd, init, runit, upstart)
that was purpose built to solve those problems.

Cheers, David

On Tue, May 22, 2018 at 7:38 AM Thomas Müller <[email protected]> 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? I personally expected that puppet would
> ensure all started processes are killed if once the exec resource finishes.
>
> - 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/61aff915-21a1-4945-b346-dbfbcb699391%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/61aff915-21a1-4945-b346-dbfbcb699391%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Cheers, David

https://twitter.com/dev_el_ops

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALF7fHZSChafT8JPvhL4iGeRYza41Th8ducsPbJaYjXC462f8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to