<div dir="ltr">Thank you for pointing me to the environment variables. Unfortunately, none of these work in this case. For example: Assume one node is currently the master. Then, because of a network failure, this node loses quorum. Because &quot;no-quorum-policy&quot; is set to &quot;ignore&quot;, this node will keep being a master. In this case there is no change of state, thus the notify-function of the OCF-agent does not get called by pacemaker. I&#39;ve already tried this, so I am quite sure about that.<br>
<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-11 8:16 GMT+02:00 Alexandre <span dir="ltr">&lt;<a href="mailto:alxgomz@gmail.com" target="_blank">alxgomz@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr"><br>
Le 10 avr. 2014 15:44, &quot;Christian Ciach&quot; &lt;<a href="mailto:dereineda@gmail.com" target="_blank">dereineda@gmail.com</a>&gt; a écrit :</p><div class=""><br>
&gt;<br>
&gt; I don&#39;t really like the idea to periodically poll &quot;crm_node -q&quot; for the current quorum state. No matter how frequently the monitor-function gets called, there will always be a small time frame where both nodes will be in the master state at the same time. <br>


&gt;<br>
&gt; Is there a way to get a notification to the OCF-agent whenever the quorum state changes?</div><p></p>
<p dir="ltr">You should probably look for something like this in the ocfshellfunction.sh file.</p>
<p dir="ltr">But also take a look at the page below, it has a lot of multi state dedicated variables that are most definitely useful in your case.</p>
<p dir="ltr"><a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_multi_state_proper_interpretation_of_notification_environment_variables.html" target="_blank">http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_multi_state_proper_interpretation_of_notification_environment_variables.html</a></p>


<p dir="ltr"></p><div class="">&gt;<br>
&gt;<br>
&gt; 2014-04-08 10:14 GMT+02:00 Christian Ciach &lt;<a href="mailto:dereineda@gmail.com" target="_blank">dereineda@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;&gt; Interesting idea! I can confirm that this works. So, I need to monitor the output of &quot;crm_node -q&quot; to check if the current partition has quorum. If the partition doesn&#39;t have quorum, I need to set the location constraint according to your example. If the partition gets quorum again, I need to remove the constraint.<br>


&gt;&gt;<br>
&gt;&gt; This seems almost a bit hacky, but it should work okay. Thank you! It almost a shame that pacemaker doesn&#39;t have &quot;demote&quot; as a &quot;no-quorum-policy&quot;, but supports &quot;demote&quot; as a &quot;loss-policy&quot; for tickets.<br>


&gt;&gt;<br>
&gt;&gt; Yesterday I had another idea: Maybe I won&#39;t use a multistate resource agent but a primitive instead. This way, I will start the resource outside of pacemaker and let the start-action of the OCF-agent set the resource to master and the stop-action sets it to slave. Then I will just use &quot;no-quorum-policy=stop&quot;. The downside of this is that I cannot distinguish between a stopped resource and a resource in a slave state using crm_mon.<br>


&gt;<br>
&gt;<br>
&gt;<br></div><div class="">
&gt; _______________________________________________<br>
&gt; Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
&gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
&gt; 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>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
&gt;<br>
</div><p></p>
<br>_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><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><br>
<br></blockquote></div><br></div>