<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Ok. <BR>
Now I understand how this work. <BR>
The lsb script did not work correctly (because conf files where in the drbd disk and it is only mounted in one server).<BR>
<BR>
Thank you very much. It is working now.<BR>
<BR>
<BR>
El mar, 21-09-2010 a las 08:55 +0200, Andrew Beekhof escribió:
<BLOCKQUOTE TYPE=CITE>
<PRE>
2010/9/2 Josué Alcalde González <<A HREF="mailto:josue.alcalde@csa.es">josue.alcalde@csa.es</A>>:
> First, as i am new in this list I would like hello to everybody.
>
> I have configured a 4 node cluster with ubuntu 10.04 with a simple
> architecture.
> All nodes are the same machine, with a root partition and a data
> partition shared with drbd.
>
> node1: First apache webserver node
> node2: Second apache webserver node
> node1 and node2 has a drbd resource called webserversdisk in
> master/slave using ext4.
>
> node3: First mysql server
> node4: Second mysql server
> node3 and node4 has a drbd resource called webserversdisk in
> master/slave using ext4.
>
> DRBD is using Master/Slave without OCFS or GFS (it uses EXT4) so there
> will be only one node with apache2 and one node with mysql.
>
>
> The problem is I am getting some problem with location and colocation.
> In fact, my apache primitive try to start in ubuntu02, ubuntu03 and
> ubuntu04 instead of ubuntu01, where my drbd webserverdisk is mounted.
The cluster isn't actually starting apache there.
It's checking those nodes to make sure it isn't already running there,
but either the RA isn't installed or something it needs to produce a
sane status is missing.
Thats why you're getting failed _monitor_0 actions:
mysqld_monitor_0 (node=ubuntu01, call=4, rc=5, status=complete):
not installed
mysqld_monitor_0 (node=ubuntu02, call=4, rc=5, status=complete):
not installed
apache_monitor_0 (node=ubuntu02, call=8, rc=254, status=complete): <unknown>
apache_stop_0 (node=ubuntu02, call=10, rc=254, status=complete): <unknown>
Fix that and your problems will go away.
> Of course, apache is not starting because it only can works if the
> webserverdisk is mounted in the machine.
>
> My pacemaker configuration is this (I think some location directives are
> not needed):
>
> node ubuntu01
> node ubuntu02
> node ubuntu03
> node ubuntu04
> primitive apache lsb:apache2 \
> meta target-role="Started"
> primitive drbd_disk_dataserver ocf:linbit:drbd \
> params drbd_resource="dataserverdisk" \
> op monitor interval="15s"
> primitive drbd_disk_webserver ocf:linbit:drbd \
> params drbd_resource="webserverdisk" \
> op monitor interval="15s"
> primitive fs_drbd_dataserver ocf:heartbeat:Filesystem \
> params device="/dev/drbd/by-res/dataserverdisk"
> directory="/srv/data" fstype="ext4"
> primitive fs_drbd_webserver ocf:heartbeat:Filesystem \
> params device="/dev/drbd/by-res/webserverdisk"
> directory="/srv/data" fstype="ext4"
> primitive ip_cluster_dataserver ocf:heartbeat:IPaddr2 \
> params ip="172.16.15.106" nic="eth0:0"
> primitive ip_cluster_webserver ocf:heartbeat:IPaddr2 \
> params ip="172.16.15.105" nic="eth0:0"
> primitive mysqld lsb:mysql \
> meta target-role="Started"
> group group_dataserver fs_drbd_dataserver ip_cluster_dataserver mysqld \
> meta target-role="Started"
> group group_webserver fs_drbd_webserver ip_cluster_webserver apache \
> meta target-role="Started"
> ms ms_drbd_dataserver drbd_disk_dataserver \
> meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true" target-role="Started"
> ms ms_drbd_webserver drbd_disk_webserver \
> meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true" target-role="Started"
> location location_dataserver_1 ms_drbd_dataserver 200: ubuntu03
> location location_dataserver_1_fs_drbd fs_drbd_dataserver 200: ubuntu03
> location location_dataserver_1_group group_dataserver 200: ubuntu03
> location location_dataserver_1_ip_cluster ip_cluster_dataserver 200:
> ubuntu03
> location location_dataserver_1_mysqld mysqld 200: ubuntu03
> location location_dataserver_2 ms_drbd_dataserver 100: ubuntu04
> location location_dataserver_2_fs_drbd fs_drbd_dataserver 100: ubuntu04
> location location_dataserver_2_group group_dataserver 100: ubuntu04
> location location_dataserver_2_ip_cluster ip_cluster_dataserver 100:
> ubuntu04
> location location_dataserver_2_mysqld mysqld 100: ubuntu04
> location location_dataserver_3 ms_drbd_dataserver -inf: ubuntu01
> location location_dataserver_3_fs_drbd fs_drbd_dataserver -inf: ubuntu01
> location location_dataserver_3_group group_dataserver -inf: ubuntu01
> location location_dataserver_3_ip_cluster ip_cluster_dataserver -inf:
> ubuntu01
> location location_dataserver_3_mysqld mysqld -inf: ubuntu01
> location location_dataserver_4 ms_drbd_dataserver -inf: ubuntu02
> location location_dataserver_4_fs_drbd fs_drbd_dataserver -inf: ubuntu02
> location location_dataserver_4_group group_dataserver -inf: ubuntu02
> location location_dataserver_4_ip_cluster ip_cluster_dataserver -inf:
> ubuntu02
> location location_dataserver_4_mysqld mysqld -inf: ubuntu02
> location location_webserver_1 ms_drbd_webserver 200: ubuntu01
> location location_webserver_1_apache2 apache 200: ubuntu01
> location location_webserver_1_fs_drbd fs_drbd_webserver 200: ubuntu01
> location location_webserver_1_group group_webserver 200: ubuntu01
> location location_webserver_1_ip_cluster ip_cluster_webserver 200:
> ubuntu01
> location location_webserver_2 ms_drbd_webserver 100: ubuntu02
> location location_webserver_2_apache2 apache 100: ubuntu02
> location location_webserver_2_fs_drbd fs_drbd_webserver 100: ubuntu02
> location location_webserver_2_group group_webserver 100: ubuntu02
> location location_webserver_2_ip_cluster ip_cluster_webserver 100:
> ubuntu02
> location location_webserver_3 ms_drbd_webserver -inf: ubuntu03
> location location_webserver_3_apache2 apache -inf: ubuntu03
> location location_webserver_3_fs_drbd fs_drbd_webserver -inf: ubuntu03
> location location_webserver_3_group group_webserver -inf: ubuntu03
> location location_webserver_3_ip_cluster ip_cluster_webserver -inf:
> ubuntu03
> location location_webserver_4 ms_drbd_webserver -inf: ubuntu04
> location location_webserver_4_apache2 apache -inf: ubuntu04
> location location_webserver_4_fs_drbd fs_drbd_webserver -inf: ubuntu04
> location location_webserver_4_group group_webserver -inf: ubuntu04
> location location_webserver_4_ip_cluster ip_cluster_webserver -inf:
> ubuntu04
> colocation mnt_on_master_dataserver inf: group_dataserver
> ms_drbd_dataserver:Master
> colocation mnt_on_master_webserver inf: group_webserver
> ms_drbd_webserver:Master
> order mount_after_drbd_dataserver inf: ms_drbd_dataserver:promote
> fs_drbd_dataserver:start
> order mount_after_drbd_webserver inf: ms_drbd_webserver:promote
> fs_drbd_webserver:start
> property $id="cib-bootstrap-options" \
> dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
> cluster-infrastructure="openais" \
> default-resource-stickiness="200" \
> expected-quorum-votes="4" \
> no-quorum-policy="ignore" \
> stonith-enabled="false" \
> symmetric-cluster="false" \
> last-lrm-refresh="1283288149"
>
>
> Also, this is the output of crm_mon:
>
> ============
> Last updated: Thu Sep 2 18:59:05 2010
> Stack: openais
> Current DC: ubuntu01 - partition with quorum
> Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd
> 4 Nodes configured, 4 expected votes
> 4 Resources configured.
> ============
>
> Online: [ ubuntu03 ubuntu04 ubuntu01 ubuntu02 ]
>
> Resource Group: group_dataserver
> fs_drbd_dataserver (ocf::heartbeat:Filesystem): Started ubuntu04
> ip_cluster_dataserver (ocf::heartbeat:IPaddr2): Started ubuntu04
> mysqld (lsb:mysql): Started ubuntu04
> Master/Slave Set: ms_drbd_dataserver
> Masters: [ ubuntu04 ]
> Slaves: [ ubuntu03 ]
> Resource Group: group_webserver
> fs_drbd_webserver (ocf::heartbeat:Filesystem): Started ubuntu01
> ip_cluster_webserver (ocf::heartbeat:IPaddr2): Started ubuntu01
> apache (lsb:apache2) Started [ ubuntu02 ubuntu03 ubuntu04 ]
> Master/Slave Set: ms_drbd_webserver
> Masters: [ ubuntu01 ]
> Slaves: [ ubuntu02 ]
>
> Failed actions:
> mysqld_monitor_0 (node=ubuntu01, call=4, rc=5, status=complete): not installed
> mysqld_monitor_0 (node=ubuntu02, call=4, rc=5, status=complete): not installed
> apache_monitor_0 (node=ubuntu02, call=8, rc=254, status=complete): <unknown>
> apache_stop_0 (node=ubuntu02, call=10, rc=254, status=complete): <unknown>
>
>
> Thanks for any help.
>
>
>
> _______________________________________________
> Pacemaker mailing list: <A HREF="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</A>
> <A HREF="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</A>
>
> Project Home: <A HREF="http://www.clusterlabs.org">http://www.clusterlabs.org</A>
> Getting started: <A HREF="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</A>
> Bugs: <A HREF="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</A>
>
_______________________________________________
Pacemaker mailing list: <A HREF="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</A>
<A HREF="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</A>
Project Home: <A HREF="http://www.clusterlabs.org">http://www.clusterlabs.org</A>
Getting started: <A HREF="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</A>
Bugs: <A 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>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<B><FONT COLOR="#ff8200">Josué Alcalde González</FONT></B><BR>
<FONT SIZE="2"><FONT COLOR="#1f497d">Jefe de Equipo de Desarrollo en Entornos Abiertos</FONT></FONT><BR>
<FONT COLOR="#0000ff"><A HREF="mailto:josue.alcalde@csa.es">josue.alcalde@csa.es</A></FONT><BR>
<BR>
<TABLE CELLSPACING="1" CELLPADDING="0">
<TR>
<TD ROWSPAN="2" WIDTH="85" ALIGN="left">
<A HREF="http://www.csa.es"><IMG SRC="cid:1285171790.4416.109.camel@csa125" ALIGN="bottom" ALT="CSA" BORDER="0"></A>
</TD>
<TD ALIGN="left">
<FONT SIZE="2"><FONT COLOR="#808080">c/ López Bravo, 1</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#808080">Pol. Ind. Villalonquéjar (Burgos)</FONT></FONT>
</TD>
</TR>
<TR>
<TD>
<FONT SIZE="2"><FONT COLOR="#808080">Tel. (+34) 947 256 250</FONT></FONT><BR>
<FONT SIZE="2"><FONT COLOR="#808080">Fax (+34) 947 256 583</FONT></FONT>
</TD>
</TR>
</TABLE>
<IMG SRC="cid:1285171790.4416.110.camel@csa125" ALIGN="bottom" BORDER="0"><BR>
<IMG SRC="cid:1285171790.4416.111.camel@csa125" ALIGN="bottom" BORDER="0"> <FONT SIZE="1"><FONT COLOR="#4c4c4c">Antes de imprimir este e-mail piense bien si es necesario hacerlo: El medioambiente es cosa de todos.</FONT></FONT><BR>
<BR>
<FONT SIZE="2"><FONT COLOR="#000000">Este mensaje contiene información CONFIDENCIAL sometida a secreto profesional. Si ha recibido este mensaje por error, debe saber que su lectura, copia, uso o divulgación están prohibidos por la Ley. Por ello, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. Muchas gracias.</FONT></FONT><BR>
<BR>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>