[rabbitmq-discuss] RabbitMQ HA

Matthew Sackman matthew at rabbitmq.com
Thu Jul 14 14:51:48 BST 2011


Hi Lucian-Paul,

On Tue, Jul 12, 2011 at 07:54:18PM +0300, Lucian-Paul Torje wrote:
> I'm trying to configure rabbit mq with HA but starting/stopping ($
> /usr/sbin/crm_resource --meta -t primitive -r res_rabbitmq-server_1
> -p target-role -v started) the rabbit mq ogc has no effect, rabbit
> mq is not started/stopped, there is nothing on /var/log/rabbitmq,
> just like the rabbitmq didn't received the command - please advice.

What about the syslog? pacemaker is normally very noisy about what it's
doing and puts lots of entries into syslog.

> I've added an exit 0 line in /etc/init.d/rabbitmq-server just as
> described in http://www.rabbitmq.com/pacemaker.html

Ok, and you've checked that rabbit isn't actually running before you
start up pacemaker / corosync?


> Here is my configuration  (I'm using a mounted shared folder and
> already tested starting manually rabbitmq with that mnesia folder -
> /mnt/rabbit_mnesia and it works):
> 
> node ha-node1
> node ha-node2
> primitive res_rabbitmq-server_1 ocf:rabbitmq:rabbitmq-server \
>     params ip="10.41.0.158" port="5672"
> config_file="/etc/rabbitmq/rabbitmq"
> mnesia_base="/mnt/rabbit_mnesia" \
>     operations $id="res_rabbitmq-server_1-operations" \
>     op start interval="0" timeout="600" \
>     op stop interval="0" timeout="120" \
>     op monitor interval="10" timeout="20" start-delay="0" \
>     meta target-role="started" allow-migrate="true"
> ms ms_rabbitmq-server_1 res_rabbitmq-server_1 \
>     meta clone-max="2" notify="true"
> property $id="cib-bootstrap-options" \
>     expected-quorum-votes="2" \
>     dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
>     cluster-infrastructure="openais" \
>     last-lrm-refresh="1310489170"

Here's mine:

virt-debian-4:~# crm configure show
node virt-debian-3
node virt-debian-4
primitive bunny ocf:rabbitmq:rabbitmq-server \
        params mnesia_base="/media/drbd1" ip="192.168.122.100" log_base="/media/drbd1/rabbitmq_logs" config_file="/etc/rabbitmq/rabbitmq" \
        meta target-role="Started" is-managed="true"
primitive drbd ocf:linbit:drbd \
        params drbd_resource="r0" \
        op monitor interval="60s"
primitive drbd_fs ocf:heartbeat:Filesystem \
        params device="/dev/drbd1" directory="/media/drbd1" fstype="ext3"
primitive ip ocf:heartbeat:IPaddr2 \
        params ip="192.168.122.100" cidr_netmask="24"
ms drbd_ms drbd \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" target-role="Started"
colocation bunny_on_fs inf: bunny drbd_fs
colocation bunny_on_ip inf: bunny ip
colocation fs_on_drbd inf: drbd_fs drbd_ms:Master
order bunny_after_fs inf: drbd_fs bunny
order bunny_after_ip inf: ip bunny
order fs_after_drbd inf: drbd_ms:promote drbd_fs:start
property $id="cib-bootstrap-options" \
        dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
        resource-stickiness="100" \
        last-lrm-refresh="1310651109"
rsc_defaults $id="rsc-options" \
        resource-stickiness="100"

Differences that appear possibly relevant to me are:

is-managed

I've turned off the no-quorum-policy - if you're doing this with a
cluster of just 2, and you've got one down then it'll never do anything
because it won't be able to reach quorate.

resource-stickiness - this shouldn't affect things starting, but it's
useful to have it set.

stonith-enabled - I have a feeling you may have to set that unless you
actually have STONITH devices lying around.

It should work - the above config works fine for me. I'm afraid you may
just have to dig around the syslogs to try and figure out what the
problem is that is stopping pacemaker from starting up your rabbit.

Matthew


More information about the rabbitmq-discuss mailing list