Hi, all.<br><br><br>I read a rabbitmq HA(pacemaker) article at a homepage, then I tried to configure two-node HA.<br>I succeeded run drbd and rabbitmq service by pacemaker. But It failed when I tried to migrate from master to slave server.<br>
<br><br>This is first situation.<br>my node 'ha-node-1', 'ha-node-2'. <br>Master is 'ha-node-2'<br><br>ha-node-2# crm_mon<br>============<br>Last updated: Thu Dec 29 10:13:15 2011<br>Stack: openais<br>
Current DC: ha-node-1 - partition with quorum<br>Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd<br>2 Nodes configured, 2 expected votes<br>3 Resources configured.<br>============<br><br>Online: [ ha-node-1 ha-node-2 ]<br>
<br> Master/Slave Set: drbd_ms<br> Masters: [ ha-node-2 ]<br> Slaves: [ ha-node-1 ]<br>drbd_fs (ocf::heartbeat:Filesystem): Started ha-node-2<br>bunny (ocf::rabbitmq:rabbitmq-server): Started ha-node-2<br>
<br><br>ha-node-2~# cat /proc/drbd<br>version: 8.3.7 (api:88/proto:86-91)<br>GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by root@glance-demo, 2011-12-26 13:05:30<br><br> 1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r----<br>
ns:486 nr:5 dw:491 dr:287 al:6 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:0<br><br>I tested fail situation from master. so<br>ha-node-2~# crm node standby<br><br>ha-node-1~# crm_mon<br>============<br>Last updated: Thu Dec 29 10:32:56 2011<br>
Stack: openais<br>Current DC: ha-node-1 - partition with quorum<br>Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd<br>2 Nodes configured, 2 expected votes<br>3 Resources configured.<br>============<br><br>Node ha-node-2: standby<br>
Online: [ ha-node-1 ]<br><br> Master/Slave Set: drbd_ms<br> Masters: [ ha-node-1 ]<br> Stopped: [ drbd:1 ]<br>drbd_fs (ocf::heartbeat:Filesystem): Started ha-node-1<br><br>Failed actions:<br> bunny_start_0 (node=ha-node-1, call=14, rc=1, status=complete): unknown error<br>
<br>drbd is migrate to slave successfully, but resource bunny(rabbitmq) isn't start.<br>this is rabbitmq error log<br><br>root@ha-node-1:/var/log/rabbitmq# cat startup_log<br>Activating RabbitMQ plugins ...<br>ERROR: Could not delete dir /media/drbd1/rabbit@localhost-plugins-expand ({cannot_delete,<br>
"/media/drbd1/rabbit@localhost-plugins-expand/rabbit.script",<br> eacces})<br>
<br>I found slave's rabbitmq mnesia dir's owner is ais, not rabbitmq.<br>root@ha-node-1:/var/log/rabbitmq# cd /media/drbd1/<br>root@ha-node-1:/media/drbd1# ll<br>total 20<br>drwxr-xr-x 5 ais ais 1024 2011-12-28 17:09 ./<br>
drwxr-xr-x 3 root root 4096 2011-12-27 13:22 ../<br>-rw-r--r-- 1 ais ais 3 2011-12-28 16:48 hello<br>drwx------ 2 ais ais 12288 2011-12-28 16:47 lost+found/<br>drwxr-xr-x 5 ais ais 1024 2011-12-29 10:32 rabbit@localhost/<br>
drwxr-xr-x 2 ais ais 1024 2011-12-28 17:09 rabbit@localhost-plugins-expand/<br><br>When ha-node-2 success to run rabbitmq, <br>mnesia dir's owner is rabbitmq.<br>root@ha-node-2:/media/drbd1# ll<br>total 20<br>drwxr-xr-x 5 rabbitmq rabbitmq 1024 2011-12-28 17:09 ./<br>
drwxr-xr-x 3 root root 4096 2011-12-27 10:58 ../<br>-rw-r--r-- 1 rabbitmq rabbitmq 3 2011-12-28 16:48 hello<br>drwx------ 2 rabbitmq rabbitmq 12288 2011-12-28 16:47 lost+found/<br>drwxr-xr-x 5 rabbitmq rabbitmq 1024 2011-12-29 09:42 rabbit@localhost/<br>
drwxr-xr-x 2 rabbitmq rabbitmq 1024 2011-12-28 17:09 rabbit@localhost-plugins-expand/<br><br><br>Why pacemaker change owner of file/folder from rabbitmq to ais? I think that is a reason to fail to run rabbitmq at slave(ha-node-1) server.<br>
<br>How can I fix that? I hope your reply. <br><br>Thanks.<br><br><br><br>ps.<br>this is pacemaker configure.<br># crm configure show<br>node ha-node-1 \<br> attributes standby="off"<br>node ha-node-2 \<br>
attributes standby="on"<br>primitive bunny ocf:rabbitmq:rabbitmq-server \<br> params mnesia_base="/media/drbd1" \<br> meta target-role="Started" is-managed="true"<br>
primitive drbd ocf:linbit:drbd \<br> params drbd_resource="drbd1" \<br> op monitor interval="60s"<br>primitive drbd_fs ocf:heartbeat:Filesystem \<br> params device="/dev/drbd1" directory="/media/drbd1" fstype="ext3"<br>
ms drbd_ms drbd \<br> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"<br>colocation bunny_on_fs inf: bunny drbd_fs<br>colocation fs_on_drbd inf: drbd_fs drbd_ms:Master<br>
order bunny_after_fs inf: drbd_fs bunny<br>order fs_after_drbd inf: drbd_ms:promote drbd_fs:start<br>property $id="cib-bootstrap-options" \<br> dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \<br>
cluster-infrastructure="openais" \<br> expected-quorum-votes="2" \<br> stonith-enabled="false" \<br> no-quorum-policy="ignore"<br>rsc_defaults $id="rsc-options" \<br>
resource-stickiness="100"<br><br><br>