[Pacemaker] Problem with ocf:heartbeat:mysql
Dominik Klein
dk at in-telegence.net
Mon Aug 17 07:05:52 UTC 2009
Dominik Klein wrote:
> Michal wrote:
>> Hi,
>> When I try to start mysql with config:
>> primitive drbd1 ocf:heartbeat:drbd \
>> params drbd_resource=db \
>> op monitor role=Master interval=59s timeout=30s \
>> op monitor role=Slave interval=60s timeout=30s
>>
>> ms ms-drbd1 drbd1 \
>> meta clone-max=2 master-max="1" master-node-max="1" clone-node-max="1"
>> notify=true globally-unique=false
>>
>> primitive fs0 ocf:heartbeat:Filesystem \
>> params fstype=reiserfs directory=/home/data device=/dev/drbd1 \
>> meta migration-threshold="50"
>>
>> primitive mysql ocf:heartbeat:mysql \
>> params binary="/usr/bin/mysqld_safe" config="/etc/mysql/my.cnf"
>> socket"/var/run/mysqld/mysqld.sock" \
>> pid="/var/run/mysqld/mysqld.pid" op monitor interval="60s"
>> timeout="30s" \
>> meta target-role="Started"
>>
>> primitive virtual-ip ocf:heartbeat:IPaddr2 \
>> params ip="x" broadcast="x" nic="eth0"cidr_netmask="24" \
>> op monitor interval=21s timeout=5s
>>
>> group server-mysql fs0 mysql virtual-ip
>>
>> order ms-drbd1-before-fs0 inf: ms-drbd1:promote fs0:start
>>
>> colocation res-group-on-ms-drbd1 inf: server-mysql ms-drbd1:Master
>>
>> location ms-drbd1-master-on-node2 ms-drbd1 \
>> rule id="ms-drbd1-master-on-node2-rule" role="master" 100: #uname eq node2
>>
>> everything is ok, but when I add "order virtual-ip-before-mysql inf:
>> virtual-ip:promote mysql:start" (to be sure that first start virtual ip
>> on which mysql should work) mysql won't start.
>
> An IP is usually not promoted. Make that virtual-ip:start and see how it
> goes. Copy/paste error?
>
> Regards
> Dominik
Reading more carefully (it's monday morning ...): You already have the
ip and mysql in a group. That makes the resources run on the same node
and in the order you specified in the group-statement.
So drop that order constraint and you'll be fine.
Sorry and Regards
Dominik
More information about the Pacemaker
mailing list