[ClusterLabs] When does pacemaker call 'restart'/'force-reload' operations on LSB resource?
Ondrej
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.
https://github.com/ClusterLabs/pacemaker/blob/92b0c1d69ab1feb0b89e141b5007f8792e69655e/lib/services/services_lsb.c#L39-L40
Questions:
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">
<operations>
<op id="myResource-force-reload-interval-0s" interval="0s"
name="force-reload" timeout="15s"/>
<op id="myResource-monitor-interval-15" interval="15"
name="monitor" timeout="15"/>
<op id="myResource-restart-interval-0s" interval="0s"
name="restart" timeout="15"/>
<op id="myResource-start-interval-0s" interval="0s" name="start"
timeout="15"/>
<op id="myResource-stop-interval-0s" interval="0s" name="stop"
timeout="15"/>
</operations>
<instance_attributes id="myResource-instance_attributes"/>
<meta_attributes id="myResource-meta_attributes"/>
</primitive>
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.
http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
--
Ondrej
More information about the Users
mailing list