<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-27 7:34 GMT+02:00 Andrew Beekhof <span dir="ltr"><<a href="mailto:andrew@beekhof.net" target="_blank">andrew@beekhof.net</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><br>
On 27 May 2014, at 3:12 pm, Gao,Yan <<a href="mailto:ygao@suse.com">ygao@suse.com</a>> wrote:<br>
<br>
> On 05/27/14 08:07, Andrew Beekhof wrote:<br>
>><br>
>> On 26 May 2014, at 10:47 pm, Christian Ciach <<a href="mailto:dereineda@gmail.com">dereineda@gmail.com</a>> wrote:<br>
>><br>
>>> I am sorry to get back to this topic, but I'm genuinely curious:<br>
>>><br>
>>> Why is "demote" an option for the ticket "loss-policy" for multi-site-clusters but not for the normal "no-quorum-policy" of local clusters? This seems like a missing feature to me.<br>

>><br>
>> Or one feature too many.<br>
>> Perhaps Yan can explain why he wanted demote as an option for the loss-policy.<br>
> Loss-policy="demote" is a kind of natural default if the "Master" mode<br>
> of a resource requires a ticket like:<br>
> <rsc_ticket rsc="ms1" rsc-role="Master" ticket="ticketA"/><br>
><br>
> The idea is for running stateful resource instances across clusters. And<br>
> loss-policy="demote" provides the possibility if there's the need to<br>
> still run the resource in slave mode for any reason when losing the<br>
> ticket, rather than stopping it or fencing the node hosting it.<br>
<br>
</div>I guess the same logic applies to the single cluster use-case too and we should allow no-quorum-policy=demote.<br>
<br></blockquote><div><br></div><div>Thank you for mentioning this. This was my thought as well.<br><br></div><div>At the moment we "simulate" this behaviour by using a primitive resource where "started" means "master" and "stopped" means "slave". This way we can use "no-quorum-policy=stop" to actually switch the resource to slave on quorum loss. This seems hacky, so I would appreciate if this could be done in a proper way some time in the future.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
One question though... do we still stop non-master/slave resources for loss-policy=demote?<br>
<div class=""><div class="h5"><br>
><br>
> Regards,<br>
>  Yan<br>
><br>
>><br>
>>><br>
>>> Best regards<br>
>>> Christian<br>
>>><br>
>>><br>
>>> 2014-04-07 9:54 GMT+02:00 Christian Ciach <<a href="mailto:dereineda@gmail.com">dereineda@gmail.com</a>>:<br>
>>> Hello,<br>
>>><br>
>>> I am using Corosync 2.0 with Pacemaker 1.1 on Ubuntu Server 14.04 (daily builds until final release).<br>
>>><br>
>>> My problem is as follows: I have a 2-node (plus a quorum-node) cluster to manage a multistate-resource. One node should be the master and the other one the slave. It is absolutely not allowed to have two masters at the same time. To prevent a split-brain situation, I am also using a third node as a quorum-only node (set to standby). There is no redundant connection because the nodes are connected over the internet.<br>

>>><br>
>>> If one of the two nodes managing the resource becomes disconnected, it loses quorum. In this case, I want this resource to become a slave, but the resource should never be stopped completely! This leaves me with a problem: "no-quorum-policy=stop" will stop the resource, while "no-quorum-policy=ignore" will keep this resource in a master-state. I already tried to demote the resource manually inside the monitor-action of the OCF-agent, but pacemaker will promote the resource immediately again.<br>

>>><br>
>>> I am aware that I am trying the manage a multi-site-cluster and there is something like the booth-daemon, which sounds like the solution to my problem. But unfortunately I need the location-constraints of pacemaker based on the score of the OCF-agent. As far as I know location-constraints are not possible when using booth, because the 2-node-cluster is essentially split into two 1-node-clusters. Is this correct?<br>

>>><br>
>>> To conclude: Is it possible to demote a resource on quorum loss instead of stopping it? Is booth an option if I need to manage the location of the master based on the score returned by the OCF-agent?<br>
>>><br>
>>><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>
><br>
> --<br>
> Gao,Yan <<a href="mailto:ygao@suse.com">ygao@suse.com</a>><br>
> Software Engineer<br>
> China Server Team, SUSE.<br>
><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>
</div></div><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></div>