[Pacemaker] How to write long term promote[solved]

Peter Kutak peter.kutak at microstep-mis.com
Wed Jan 26 16:28:45 EST 2011


problem was not in monitoring or promote timeout at all,
but in my restarting script(backend for magic - all solving button):

crm node standby
sleep 30
crm resource cleanup ms-ims
sleep 2
crm node online

I used this script to restart Master node0;
this caused Slave node1 to promote;
but cleaning up resource after 30 seconds in time of promoting node1
caused all the problems.

Solution was, cleanup only the stopped node by command:
crm_resource --resource ms-ims --cleanup --node `hostname --short`

Thanks,

Peter

On 1/26/2011 1:27 PM, Peter Kutak wrote:
> Hello,
>
> I am writing my own OCF ResourceAgent for Master-Slave program.
>
> I have problem if promote action take more time as monitor timeout.
> Promote action finish succesfully, but pacemaker stop working corectly:
> -no post promote notify performed
> -no more monitor actions performed
> -resource is not displayed in crm_mon
> -none fails in crm_mon
>
> my crm configuration:
> primitive ims ocf:microstepmis:imsMS \
>         op monitor interval="1" role="Master" timeout="20" \
>         op monitor interval="2" role="Slave" timeout="20" \
>         op start interval="0" timeout="300s" \
>         op promote interval="0" timeout="180s"
>
> My problem occurs, if promote action take more than 20seconds.
>
> I found only basic documentation and none complex example.
> Thanks for any suggestions.
>
> Regards,
>
> Peter Kutak
>





More information about the Pacemaker mailing list