<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 &#36;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>&nbsp;Mittwoch, 10. April 2013 um 09:58 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Felix Zachlod&quot; &lt;fz.lists@sis-gmbh.info&gt;<br/>
<b>An:</b>&nbsp;&quot;&#39;The Pacemaker cluster resource manager&#39;&quot; &lt;pacemaker@oss.clusterlabs.org&gt;<br/>
<b>Betreff:</b>&nbsp;[Pacemaker] Master Slave Resource Agent won&#39;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/>
&quot;Master&quot;<br/>
The Cluster Manager does not even try to promote as I don&#39;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 &#92;<br/>
params wwnn=&quot;77:00:00:00:00:00:01:00&quot; wwpn=&quot;77:00:00:00:00:00:01:01&quot;<br/>
parentwwpns=&quot;storage-test-a;21:00:00:e0:8b:86:0e:cf<br/>
storage-test-b;21:00:00:1b:32:88:66:c5&quot; &#92;<br/>
op stop interval=&quot;0&quot; timeout=&quot;40s&quot;<br/>
<br/>
ms ms_fctarget_7701 p_fctarget_7701 &#92;<br/>
meta master-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot;<br/>
target-role=&quot;Master&quot;<br/>
<br/>
My resource agent does support the promote and demote action and advertises<br/>
them in the meta data:<br/>
<br/>
&lt;actions&gt;<br/>
&lt;action name=&quot;start&quot; timeout=&quot;15&quot; /&gt;<br/>
&lt;action name=&quot;stop&quot; timeout=&quot;40&quot; /&gt;<br/>
&lt;action name=&quot;promote&quot; timeout=&quot;20&quot; /&gt;<br/>
&lt;action name=&quot;demote&quot; timeout=&quot;20&quot; /&gt;<br/>
&lt;action name=&quot;status &quot; timeout=&quot;10&quot; interval=&quot;10&quot; /&gt;<br/>
&lt;action name=&quot;monitor&quot; timeout=&quot;10&quot; interval=&quot;10&quot;<br/>
role=&quot;Master&quot;/&gt;<br/>
&lt;action name=&quot;monitor&quot; timeout=&quot;10&quot; interval=&quot;10&quot;<br/>
role=&quot;Slave&quot;/&gt;<br/>
&lt;action name=&quot;meta-data&quot; timeout=&quot;5&quot; /&gt;<br/>
&lt;action name=&quot;validate-all&quot; timeout=&quot;10&quot; /&gt;<br/>
&lt;/actions&gt;<br/>
<br/>
case &#36;__OCF_ACTION in<br/>
start) fctarget_start;;<br/>
stop) fctarget_stop;;<br/>
promote) fctarget_promote;;<br/>
demote) fctarget_demote;;<br/>
monitor&#124;status) fctarget_monitor;;<br/>
validate-all) fctarget_validate_all;;<br/>
*) fctarget_usage<br/>
exit &#36;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>