Open ov7a opened 8 years ago
Possible fix (program.pp):
...
case $ensure_process {
'stopped': {
supervisord::supervisorctl { "stop_${name}":
command => 'stop',
process => $name
}
}
'removed': {
supervisord::supervisorctl { "remove_${name}":
command => 'remove',
process => $name
}
}
'running': {
supervisord::supervisorctl { "start_${name}":
command => 'start',
process => $name,
unless => 'running'
}
supervisord::supervisorctl { "restart_${name}":
command => 'restart',
process => $name,
refreshonly => true
}
}
default: { }
}
For example, I need some supervisor service. I declare a manifest for config file and a manifest for supervisor::program. Then I add "subscribe" parameter to latter. I expect that when config changes, puppet notifies supervisor::program with refresh event and it should restart service. But this does not happen. I see only refresh of
Exec[supervisorctl_command_start_<program>]
. So just start signal is sent, not restart. This behavior should be fixed.