StopCommand
By default, the StopCommand is executed synchronously by System Automation for Multiplatforms, meaning that System Automation for Multiplatforms waits for the command to finish and obtain knowledge of any return code. Furthermore there is an attribute StopCommandTimeout for each resource which determines how long it takes at most to execute the StopCommand. If the StopCommand does not return within the StopCommandTimeout time period, the StopCommand is killed by System Automation for Multiplatforms using the SIGKILL command. If this happens a message is logged into the system log of that node.
MAX(StopCommandTimeout, MonitorCommandPeriod, MonitorCommandTimeout) + 5Note that + 5 is not an absolute value as System Automation for Multiplatforms does
not use a real timer. The System Automation for Multiplatforms daemons
are woken up frequently,
and this may result in the additional value, which may be in the range
of 5 to 8 seconds.
#/bin/sh
# A sample stop/reset automation script for the lpd application
if [ $SA_RESET -eq 1 ]; then
killall -9 lpd
exit $?
else
/etc/init.d/lpd stop
exit $?
fi #/bin/sh
# A sample stop/reset automation script for the lpd application
if [ $SA_RESET == 1 ]; then
exit 0
else
/etc/init.d/lpd stop
exit $?
fi If the resource still does not stop after the second execution of the StopCommand, the OpState of the resource is set to Stuck Online, which means that manual intervention is now required to stop the resource. System Automation for Multiplatforms will resume automating the resource only after the problem has been resolved by an operator.
A manual reset now causes a stop command to run for all specified resources. If the
resetrsrc command is executed without specifying the
NodeNameList attribute within the selection string, the stop command will
be executed against all resources. If only the resource name is specified in the
selection string for a floating resource, the stop command is executed for each
constituent as well as for the aggregate resource, as the selection string comprises the
aggregate resource and the constituent resources. As stop command handling for the
aggregate resource itself is delegated to all of the constituent resources, all
constituent resources will execute the stop command twice. This is why it is
recommended that you specify the NodeNameList attribute whenever resetrsrc is executed
within the selection string of the command.