[ClusterLabs] When does pacemaker call 'restart'/'force-reload' operations on LSB resource?
ondrej-clusterlabs at famera.cz
Wed Dec 4 00:53:19 EST 2019
Hi ClusterLabs list,
When adding 'LSB' script to pacemaker cluster I can see that pacemaker
advertises 'restart' and 'force-reload' operations to be present -
regardless if the LSB script supports it or not.
This seems to be coming from following piece of code.
1. When the 'restart' and 'force-reload' operations are called on the
LSB script cluster resource?
2. How can I trigger 'restart' and 'force-reload' operation on LSB
script cluster resource in pacemaker?
Cluster resource definition looks like this:
<primitive class="lsb" id="myResource" type="script.sh">
<op id="myResource-force-reload-interval-0s" interval="0s"
<op id="myResource-monitor-interval-15" interval="15"
<op id="myResource-restart-interval-0s" interval="0s"
<op id="myResource-start-interval-0s" interval="0s" name="start"
<op id="myResource-stop-interval-0s" interval="0s" name="stop"
I would have expected that 'restart' operation would be called when
using 'crm_resource --restart --resource myResource', but I can see that
'stop' and 'start' operations are used in that case instead. For
'force-reload' I have no idea on how to try trigger it looking at
'crm_resource --help' output.
I want to make sure that cluster will not attempt running 'restart' nor
'force-reload' on script that is not implementing them.
As for now I'm considering to return exit code '3' from script when
these actions are called to indicate that they are 'unimplemented
feature' as suggested by LSB specification below. However I would like
to verify that this works as expected.
More information about the Users