<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Pavlos Parissis wrote:
<blockquote
cite="mid:AANLkTikX_JqAN4n4i3kdmuEb+uftg1oc681V9BatmWwz@mail.gmail.com"
type="cite">
<pre wrap="">On 12 October 2010 20:00, Dan Frincu <a class="moz-txt-link-rfc2396E" href="mailto:dfrincu@streamwide.ro"><dfrincu@streamwide.ro></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
Lars Ellenberg wrote:
On Mon, Oct 11, 2010 at 03:50:01PM +0300, Dan Frincu wrote:
Hi,
Dejan Muhamedagic wrote:
Hi,
On Sun, Oct 10, 2010 at 10:27:13PM +0300, Dan Frincu wrote:
Hi,
I have the following setup:
- order drbd0:promote drbd1:promote
- order drbd1:promote drbd2:promote
- order drbd2:promote all:start
- collocation all drbd2:Master
- all is a group of resources, drbd{0..3} are drbd ms resources.
I want to migrate the resources based on ping connectivity to a
default gateway. Based on
<a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/wiki/Pingd_with_resources_on_different_networks">http://www.clusterlabs.org/wiki/Pingd_with_resources_on_different_networks</a>
and <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/wiki/Example_configurations">http://www.clusterlabs.org/wiki/Example_configurations</a> I've
tried the following:
- primitive ping ocf:pacemaker:ping params host_list=1.2.3.4
multiplier=100 op monitor interval=5s timeout=5s
- clone ping_clone ping meta globally-unique=false
- location ping_nok all \
rule $id="ping_nok-rule" -inf: not_defined ping_clone or
ping_clone number:lte 0
Use pingd to reference the attribute in the location constraint.
Not to be disrespectful, but after 3 days being stuck on this issue,
I don't exactly understand how to do that. Could you please provide
an example.
Thank you in advance.
The example you reference lists:
primitive pingdnet1 ocf:pacemaker:pingd \
params host_list=192.168.23.1 \
name=pingdnet1
^^^^^^^^^^^^^^
clone cl-pingdnet1 pingdnet1
^^^^^^^^^
param name default is pingd,
and is the attribute name to be used in the location constraints.
You will need to reference pingd in you location constraint, or set an
explicit name in the primitive definition, and reference that.
Your ping primitive sets the default 'pingd' attribute,
but you reference some 'ping_clone' attribute,
which apparently no-one really references.
I've finally managed to finish the setup with the indications received
above, the behavior is the expected one. Also, I've tried the
ocf:pacemaker:pingd and even though it does the reachability tests properly,
it fails to update the cib upon restoring the connectivity, I had to
manually run attrd_updater -R to get the resources to start again, therefore
I'm going with ocf:pacemaker:ping.
</pre>
</blockquote>
<pre wrap=""><!---->it would be quite useful for the rest of people if you post your final
and working configuration.
Cheers,
Pavlos
</pre>
</blockquote>
The relevant stuff is related to the group and ping location constraint.<br>
<br>
primitive <u><i>ping_gw</i></u> ocf:pacemaker:ping \<br>
params host_list="1.1.1.99" multiplier="100" <b>name="ping_gw_name"
</b>\<br>
op monitor interval="5s" timeout="60s" \<br>
op start interval="0s" timeout="60s"<br>
group all virtual_ip_1 virtual_ip_2 Failover_Alert fs_home fs_mysql
fs_storage httpd mysqld \<br>
meta target-role="Started"<br>
ms ms_drbd_home drbd_home \<br>
meta notify="true" globally-unique="false"
target-role="Started" master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1"<br>
ms ms_drbd_mysql drbd_mysql \<br>
meta notify="true" globally-unique="false"
target-role="Started" master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1"<br>
ms ms_drbd_storage drbd_storage \<br>
meta notify="true" globally-unique="false"
target-role="Started" master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1"<br>
clone ping_gw_clone <u><i>ping_gw</i></u> \<br>
meta globally-unique="false" target-role="Started"<br>
location nok_ping_to_gw all \<br>
rule $id="nok_ping_to_gw-rule" -inf: not_defined <b>ping_gw_name</b>
or <b>ping_gw_name</b> lte 0<br>
colocation all_on_home inf: all ms_drbd_home:Master<br>
colocation all_on_mysql inf: all ms_drbd_mysql:Master<br>
colocation all_on_storage inf: all ms_drbd_storage:Master<br>
order all_after_storage inf: ms_drbd_storage:promote all:start<br>
order ms_drbd_home_after_ms_drbd_mysql inf: ms_drbd_mysql:promote
ms_drbd_home:promote<br>
order ms_drbd_storage_after_ms_drbd_home inf: ms_drbd_home:promote
ms_drbd_storage:promote<br>
property $id="cib-bootstrap-options" \<br>
expected-quorum-votes="2" \<br>
stonith-enabled="false" \<br>
symmetric-cluster="true" \<br>
dc-version="1.0.9-89bd754939df5150de7cd76835f98fe90851b677" \<br>
no-quorum-policy="ignore" \<br>
cluster-infrastructure="openais" \<br>
last-lrm-refresh="1286905225"<br>
rsc_defaults $id="rsc-options" \<br>
multiple-active="block" \<br>
resource-stickiness="1000"<br>
<br>
I hope this helps.<br>
<br>
Regards,<br>
<br>
Dan<br>
<blockquote
cite="mid:AANLkTikX_JqAN4n4i3kdmuEb+uftg1oc681V9BatmWwz@mail.gmail.com"
type="cite">
<pre wrap="">
_______________________________________________
Pacemaker mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@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>