Thursday, July 30, 2015

mysql-proxy not running via puppet service resource type


Had an issue with service resource for mysql-proxy.
When executing the manifest, the service would not start. If I try manually, the service runs. If I try with exec resource, the service runs.

Seems the init script is not lsb compliant
https://docs.puppetlabs.com/references/latest/type.html#service-attribute-status


Modify as such to get it working
service { 'mysql-proxy':
  ensure => "running",
  status => 'ps afx | grep -i mysql-proxy | grep -v grep',
  hasstatus => "no",
  hasrestart => "yes",
}

No comments:

Post a Comment