You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Affected Puppet, Ruby, OS and module versions/distributions
Puppet: Any
Ruby: Any
Distribution: AIX
Module version: 10.0.0
How to reproduce (e.g Puppet code you use)
Install Zabbix agent on an AIX host using this Zabbix module. Although the service is ensured to start, Puppet will not start it on subsequent runs when it is not running (e.g., if it crashes).
status)
[ -f$PID ] &&echo"running as $(cat $PID)"||echo"stopped";;
Per Puppet's apparent behavior and the Linux specification (AIX appears to respect these same codes), the script should exit 3 when the service is not running.
The net effect of exiting 0 is that the service always appear to be running when status is called, so Puppet will not start the service when it is stopped.
What behaviour did you expect instead
Puppet starts the Zabbix service when it is not running and ensured to start.
Any additional information you'd like to impart
I forked the module in my own environment and updated the template with the following code for status. This seems to solve the issue, so you could do something like this. I would appreciate if this could be incorporated into the module so I don't need to maintain my own fork. Thanks!
status)
if [[ -f$PID ]];thenecho"running as $(cat $PID)"elseecho"stopped"exit 3
fi;;
The text was updated successfully, but these errors were encountered:
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Install Zabbix agent on an AIX host using this Zabbix module. Although the service is ensured to start, Puppet will not start it on subsequent runs when it is not running (e.g., if it crashes).
What are you seeing
The
zabbix-agent-aix.init.epp
init script exits 0 whether the PID is running or not:Per Puppet's apparent behavior and the Linux specification (AIX appears to respect these same codes), the script should exit 3 when the service is not running.
The net effect of exiting 0 is that the service always appear to be running when
status
is called, so Puppet will not start the service when it is stopped.What behaviour did you expect instead
Puppet starts the Zabbix service when it is not running and ensured to start.
Any additional information you'd like to impart
I forked the module in my own environment and updated the template with the following code for
status
. This seems to solve the issue, so you could do something like this. I would appreciate if this could be incorporated into the module so I don't need to maintain my own fork. Thanks!The text was updated successfully, but these errors were encountered: