Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program ignores refreshing #101

Open
ov7a opened this issue Aug 22, 2016 · 1 comment
Open

Program ignores refreshing #101

ov7a opened this issue Aug 22, 2016 · 1 comment

Comments

@ov7a
Copy link

ov7a commented Aug 22, 2016

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.

@ov7a
Copy link
Author

ov7a commented Aug 22, 2016

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: { }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant