ajcrowe / puppet-supervisord

Puppet Module to install and configure applications under supervisord
MIT License
37 stars 104 forks source link

Add support for ensure_process = running #77

Closed ryaner closed 8 years ago

ryaner commented 8 years ago

This deals with #75. For sanity it does a check if the process is already running before trying to start it again.

ryaner commented 8 years ago

While testing this further, we hit a dependency loop when if a program is a member of a supervisord group. The same loop happens if ensure_process is set to 'stopped'. In case it helps, here is what puppet reports as the loop. I can't see how to fix it without dropping some notifies.

(Exec[supervisorctl_command_stop_test_program]
 => Supervisord::Supervisorctl[stop_test_program]
 => Supervisord::Program[test_program]
 => Supervisord::Group[test_program_group]
 => File[/etc/supervisor.d/group_test_program_group.conf]
 => Class[Supervisord::Reload]
 => Exec[supervisorctl_reread]
 => Class[Supervisord::Reload]
 => Supervisord::Supervisorctl[stop_test_program]
 => Exec[supervisorctl_command_stop_test_program])
ajcrowe commented 8 years ago

This looks good @ryaner could you add this to the other types such as fcgi_program and eventlistener

You should be the running case for these already if you rebase to master.

ryaner commented 8 years ago

We were never able to get around the dependency loop when using groups which meant I had to undo this change from our production version.

ajcrowe commented 8 years ago

I've merged a dependency fix into master see #93, could you rebase and test you change?

ajcrowe commented 8 years ago

Fixed in #72