<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi Felix,</div>

<div>maybe my hint is worthless, but have you implemented the crm_master calls in your RA ?</div>

<div>See Stateful RA demo $CRM_MASTER calls.</div>

<div>Rainer
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 10. April 2013 um 09:58 Uhr<br/>
<b>Von:</b> "Felix Zachlod" <fz.lists@sis-gmbh.info><br/>
<b>An:</b> "'The Pacemaker cluster resource manager'" <pacemaker@oss.clusterlabs.org><br/>
<b>Betreff:</b> [Pacemaker] Master Slave Resource Agent won't promote</div>

<div name="quoted-content">Hello!<br/>
<br/>
I have another problem with my resource agent which should run in a master<br/>
slave fashion.<br/>
I successfully tested the RA with ocf-tester and it completes any promote or<br/>
demote action:<br/>
<br/>
fctarget[14659]: DEBUG: Resource is running<br/>
fctarget[14659]: DEBUG: Resource is currently running as Slave<br/>
fctarget[14659]: DEBUG: fctargettest demote : 0<br/>
Checking for promote action<br/>
fctarget[14677]: DEBUG: Resource is running<br/>
fctarget[14677]: DEBUG: Resource is currently running as Slave<br/>
fctarget[14677]: DEBUG: Resource is running MASTER<br/>
fctarget[14677]: DEBUG: Resource promoted<br/>
fctarget[14677]: DEBUG: fctargettest promote : 0<br/>
Testing: demotion of started resource<br/>
fctarget[14717]: DEBUG: Resource is running MASTER<br/>
fctarget[14717]: DEBUG: Resource is currently running as Master<br/>
fctarget[14717]: DEBUG: Resource is running<br/>
fctarget[14717]: DEBUG: Resource demoted<br/>
fctarget[14717]: DEBUG: fctargettest demote : 0<br/>
Testing: promote<br/>
fctarget[14746]: DEBUG: Resource is running<br/>
fctarget[14746]: DEBUG: Resource is currently running as Slave<br/>
fctarget[14746]: DEBUG: Resource is running MASTER<br/>
fctarget[14746]: DEBUG: Resource promoted<br/>
fctarget[14746]: DEBUG: fctargettest promote : 0<br/>
Testing: demote<br/>
fctarget[14790]: DEBUG: Resource is running MASTER<br/>
fctarget[14790]: DEBUG: Resource is currently running as Master<br/>
fctarget[14790]: DEBUG: Resource is running<br/>
fctarget[14790]: DEBUG: Resource demoted<br/>
fctarget[14790]: DEBUG: fctargettest demote : 0<br/>
Testing: demotion of demoted resource<br/>
fctarget[14819]: DEBUG: Resource is running<br/>
fctarget[14819]: DEBUG: Resource is currently running as Slave<br/>
fctarget[14819]: DEBUG: fctargettest demote : 0<br/>
[...]<br/>
<br/>
fctarget passed all tests<br/>
<br/>
I added the resource to the crm and it successfully starts on both nodes.<br/>
But it does not promote anywhere although I have configured target-role<br/>
"Master"<br/>
The Cluster Manager does not even try to promote as I don't get any log<br/>
output about something failing.<br/>
<br/>
It seems the crm does not like my RA for some reason. I can successfully<br/>
promote a Stateful Dummy resource or a DRBD device with the CRM.<br/>
<br/>
Configuration of resource looks like the following:<br/>
<br/>
primitive p_fctarget_7701 ocf:onesty:fctarget \<br/>
params wwnn="77:00:00:00:00:00:01:00" wwpn="77:00:00:00:00:00:01:01"<br/>
parentwwpns="storage-test-a;21:00:00:e0:8b:86:0e:cf<br/>
storage-test-b;21:00:00:1b:32:88:66:c5" \<br/>
op stop interval="0" timeout="40s"<br/>
<br/>
ms ms_fctarget_7701 p_fctarget_7701 \<br/>
meta master-max="1" clone-max="2" clone-node-max="1"<br/>
target-role="Master"<br/>
<br/>
My resource agent does support the promote and demote action and advertises<br/>
them in the meta data:<br/>
<br/>
<actions><br/>
<action name="start" timeout="15" /><br/>
<action name="stop" timeout="40" /><br/>
<action name="promote" timeout="20" /><br/>
<action name="demote" timeout="20" /><br/>
<action name="status " timeout="10" interval="10" /><br/>
<action name="monitor" timeout="10" interval="10"<br/>
role="Master"/><br/>
<action name="monitor" timeout="10" interval="10"<br/>
role="Slave"/><br/>
<action name="meta-data" timeout="5" /><br/>
<action name="validate-all" timeout="10" /><br/>
</actions><br/>
<br/>
case $__OCF_ACTION in<br/>
start) fctarget_start;;<br/>
stop) fctarget_stop;;<br/>
promote) fctarget_promote;;<br/>
demote) fctarget_demote;;<br/>
monitor|status) fctarget_monitor;;<br/>
validate-all) fctarget_validate_all;;<br/>
*) fctarget_usage<br/>
exit $OCF_ERR_UNIMPLEMENTED<br/>
;;<br/>
<br/>
This ist he output of crm status:<br/>
<br/>
Master/Slave Set: ms_fctarget_7701 [p_fctarget_7701]<br/>
Slaves: [ storage-test-a storage-test-b ]<br/>
<br/>
I tried manually promoting and demoting the resource which simply seems to<br/>
do NOTHING.<br/>
<br/>
Can anyone give me a hint what I am missing?<br/>
<br/>
<br/>
Thank you all in advance<br/>
<br/>
<br/>
_______________________________________________<br/>
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org<br/>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br/>
<br/>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br/>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br/>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a></div>
</div>
</div>
</div></div></body></html>