plathrop / puppet-module-supervisor

Puppet module for configuring the supervisor daemon tool.
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Narrow logfile dependency to logdir instead of entire class #71

Closed wlonkly closed 9 years ago

wlonkly commented 10 years ago

We ran into a situation where we had supervisord stopped, and a typo in one of its services' ini files. Supervisord would fail to start because of the typo, and then puppet would refuse to update the ini file because the service failed to start.

Narrowed it down to this class dependency; supervisor::service has

File[$log_dir] -> File[$conf_file] ~>
    Class['supervisor::update'] -> Service["supervisor::${name}"]

and the class dependency of File[$log_dir] means that we really have

Class['supervisor'] -> File[$log_dir] -> File[$conf_file] ...

which means that if supervisor fails to start, the rest of the chain doesn't run, and so it can't self-heal. Narrowing the dependency means it self-heals in two runs.

fungusakafungus commented 10 years ago

This looks good to me.