No subject
Thu Sep 30 11:38:38 UTC 2010
6.2.2. Asymmetrical "Opt-In" Clusters
To create an opt-in cluster, start by preventing resources from
running anywhere by default
crm_attribute --attr-name symmetric-cluster --attr-value false
Then start enabling nodes. The following fragment says that the web
server prefers sles-1, the database prefers sles-2 and both can
failover to sles-3 if their most preferred node fails.
<constraints>
<rsc_location id="loc-1" rsc="Webserver" node="sles-1" score="200"/>
<rsc_location id="loc-2" rsc="Webserver" node="sles-3" score="0"/>
<rsc_location id="loc-3" rsc="Database" node="sles-2" score="200"/>
<rsc_location id="loc-4" rsc="Database" node="sles-3" score="0"/>
</constraints>
Example 6.1. Example set of opt-in location constraints
At the moment you have symmetric-cluster=false, you need to add
location constraints in order to get your resources running.
Below is my conf and it works as expected, pbx_service_01 starts on
node-01 and never fails back, in case failed over to node-03 and
node-01 is back on line, due to resource-stickiness="1000", but take a
look at the score in location constraint, very low scores compared to
1000 - I could have also set it to inf
</pre>
</blockquote>
Yes but you don't have groups defined in your setup, having groups
means the score of each active resource is added.
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<a
href="http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ch-advanced-resources.html#id2220530">http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ch-advanced-resources.html#id2220530</a><br>
<br>
For example:<br>
<br>
root at cluster1:~# ptest -sL<br>
Allocation scores:<br>
group_color: all allocation score on cluster1: 0<br>
group_color: all allocation score on cluster2: -1000000<br>
group_color: virtual_ip_1 allocation score on cluster1: 1000<br>
group_color: virtual_ip_1 allocation score on cluster2: -1000000<br>
group_color: virtual_ip_2 allocation score on cluster1: 1000<br>
group_color: virtual_ip_2 allocation score on cluster2: 0<br>
group_color: Failover_Alert allocation score on cluster1: 1000<br>
group_color: Failover_Alert allocation score on cluster2: 0<br>
group_color: fs_home allocation score on cluster1: 1000<br>
group_color: fs_home allocation score on cluster2: 0<br>
group_color: fs_mysql allocation score on cluster1: 1000<br>
group_color: fs_mysql allocation score on cluster2: 0<br>
group_color: fs_storage allocation score on cluster1: 1000<br>
group_color: fs_storage allocation score on cluster2: 0<br>
group_color: httpd allocation score on cluster1: 1000<br>
group_color: httpd allocation score on cluster2: 0<br>
group_color: mysqld allocation score on cluster1: 1000<br>
group_color: mysqld allocation score on cluster2: 0<br>
clone_color: ms_drbd_home allocation score on cluster1: 9000<br>
clone_color: ms_drbd_home allocation score on cluster2: -1000000<br>
clone_color: drbd_home:0 allocation score on cluster1: 1100<br>
clone_color: drbd_home:0 allocation score on cluster2: 0<br>
clone_color: drbd_home:1 allocation score on cluster1: 0<br>
clone_color: drbd_home:1 allocation score on cluster2: 1100<br>
native_color: drbd_home:0 allocation score on cluster1: 1100<br>
native_color: drbd_home:0 allocation score on cluster2: 0<br>
native_color: drbd_home:1 allocation score on cluster1: -1000000<br>
native_color: drbd_home:1 allocation score on cluster2: 1100<br>
drbd_home:0 promotion score on cluster1: 18100<br>
drbd_home:1 promotion score on cluster2: -1000000<br>
clone_color: ms_drbd_mysql allocation score on cluster1: 10100<br>
clone_color: ms_drbd_mysql allocation score on cluster2: -1000000<br>
clone_color: drbd_mysql:0 allocation score on cluster1: 1100<br>
clone_color: drbd_mysql:0 allocation score on cluster2: 0<br>
clone_color: drbd_mysql:1 allocation score on cluster1: 0<br>
clone_color: drbd_mysql:1 allocation score on cluster2: 1100<br>
native_color: drbd_mysql:0 allocation score on cluster1: 1100<br>
native_color: drbd_mysql:0 allocation score on cluster2: 0<br>
native_color: drbd_mysql:1 allocation score on cluster1: -1000000<br>
native_color: drbd_mysql:1 allocation score on cluster2: 1100<br>
drbd_mysql:0 promotion score on cluster1: 20300<br>
drbd_mysql:1 promotion score on cluster2: -1000000<br>
clone_color: ms_drbd_storage allocation score on cluster1: 11200<br>
clone_color: ms_drbd_storage allocation score on cluster2: -1000000<br>
clone_color: drbd_storage:0 allocation score on cluster1: 1100<br>
clone_color: drbd_storage:0 allocation score on cluster2: 0<br>
clone_color: drbd_storage:1 allocation score on cluster1: 0<br>
clone_color: drbd_storage:1 allocation score on cluster2: 1100<br>
native_color: drbd_storage:0 allocation score on cluster1: 1100<br>
native_color: drbd_storage:0 allocation score on cluster2: 0<br>
native_color: drbd_storage:1 allocation score on cluster1: -1000000<br>
native_color: drbd_storage:1 allocation score on cluster2: 1100<br>
drbd_storage:0 promotion score on cluster1: 22500<br>
drbd_storage:1 promotion score on cluster2: -1000000<br>
native_color: virtual_ip_1 allocation score on cluster1: 12300<br>
native_color: virtual_ip_1 allocation score on cluster2: -1000000<br>
native_color: virtual_ip_2 allocation score on cluster1: 8000<br>
native_color: virtual_ip_2 allocation score on cluster2: -1000000<br>
native_color: Failover_Alert allocation score on cluster1: 7000<br>
native_color: Failover_Alert allocation score on cluster2: -1000000<br>
native_color: fs_home allocation score on cluster1: 6000<br>
native_color: fs_home allocation score on cluster2: -1000000<br>
native_color: fs_mysql allocation score on cluster1: 5000<br>
native_color: fs_mysql allocation score on cluster2: -1000000<br>
native_color: fs_storage allocation score on cluster1: 4000<br>
native_color: fs_storage allocation score on cluster2: -1000000<br>
native_color: mysqld allocation score on cluster1: 4000<br>
native_color: mysqld allocation score on cluster2: -1000000<br>
native_color: httpd allocation score on cluster1: 16000<br>
native_color: httpd allocation score on cluster2: -1000000<br>
drbd_home:0 promotion score on cluster1: 1000000<br>
drbd_home:1 promotion score on cluster2: -1000000<br>
drbd_mysql:0 promotion score on cluster1: 1000000<br>
drbd_mysql:1 promotion score on cluster2: -1000000<br>
drbd_storage:0 promotion score on cluster1: 1000000<br>
drbd_storage:1 promotion score on cluster2: -1000000<br>
clone_color: ping_gw_clone allocation score on cluster1: 0<br>
clone_color: ping_gw_clone allocation score on cluster2: 0<br>
clone_color: ping_gw:0 allocation score on cluster1: 1000<br>
clone_color: ping_gw:0 allocation score on cluster2: 0<br>
clone_color: ping_gw:1 allocation score on cluster1: 0<br>
clone_color: ping_gw:1 allocation score on cluster2: 1000<br>
native_color: ping_gw:0 allocation score on cluster1: 1000<br>
native_color: ping_gw:0 allocation score on cluster2: 0<br>
native_color: ping_gw:1 allocation score on cluster1: -1000000<br>
native_color: ping_gw:1 allocation score on cluster2: 1000<br>
<br>
Regards,<br>
<br>
Dan<br>
<br>
<blockquote
cite="mid:AANLkTikn_=QrqwzEmyZ7MMEnaKFcMe85WkG=vyVmTLp=@mail.gmail.com"
type="cite">
<pre wrap="">location PrimaryNode-drbd_01 ms-drbd_01 100: node-01
location PrimaryNode-drbd_02 ms-drbd_02 100: node-02
location PrimaryNode-pbx_service_01 pbx_service_01 200: node-01
location PrimaryNode-pbx_service_02 pbx_service_02 200: node-02
location SecondaryNode-drbd_01 ms-drbd_01 0: node-03
location SecondaryNode-drbd_02 ms-drbd_02 0: node-03
location SecondaryNode-pbx_service_01 pbx_service_01 10: node-03
location SecondaryNode-pbx_service_02 pbx_service_02 10: node-03
location fencing-on-node-01 pdu 1: node-01
location fencing-on-node-02 pdu 1: node-02
location fencing-on-node-03 pdu 1: node-03
rsc_defaults $id="rsc-options" resource-stickiness="1000"
[1]<a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ch06s02s02.html">http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ch06s02s02.html</a>
_______________________________________________
Pacemaker mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Pacemaker at oss.clusterlabs.org">Pacemaker at oss.clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a>
Project Home: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="moz-txt-link-freetext" href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Dan FRINCU
Systems Engineer
CCNA, RHCE
Streamwide Romania
</pre>
</body>
</html>
--------------030701030202080506000301--
More information about the Pacemaker
mailing list