Ask Your Question
1

Build MySQL HA on openstack

asked 2013-07-09 02:26:45 -0500

anonymous user

Anonymous

updated 2013-07-09 20:46:14 -0500

Hello All:

We have deployed the MySQL HA successfully at two physical computer.

Then we try to deploy the MySQL HA in the same method at two VMs on openstack, but we got some trouble.

The two VMs can be synchronized and created virtual ip , but the same domain VMs can not get response from virtual ip through 'ping' command .

Could you give me some advice ?

We report related configure files, as list below:

======crm configure=========

node host1.localdomain

node host2.localdomain

primitive p_drbd_mysql ocf:linbit:drbd \

params drbd_resource="clusterdb_res" \

op monitor interval="15s"

primitive p_fs_mysql ocf:heartbeat:Filesystem \

params device="/dev/drbd0" directory="/var/lib/mysql_drbd" fstype="ext4"

primitive p_ip_mysql ocf:heartbeat:IPaddr2 \

params ip="10.0.0.120" cidr_netmask="25" nic="eth0"

primitive p_mysql ocf:heartbeat:mysql \

params binary="/usr/sbin/mysqld" config="/var/lib/mysql_drbd/my.cnf" datadir="/var/lib/mysql_drbd/data" pid="/var/lib/mysql/mysql.pid" socket="/var/lib/mysql/mysql.sock" user="billy" group="billy" additional_parameters="--bind-address=10.0.0.120 --user=billy" \

op start interval="0" timeout="120s" \

op stop interval="0" timeout="120s" \

op monitor interval="20s" timeout="30s"

primitive p_ping ocf:pacemaker:ping \

params name="ping" multiplier="1000" host_list="10.0.0.1" \

op monitor interval="15s" timeout="60s" start

group g_mysql p_fs_mysql p_ip_mysql p_mysql

ms ms_drbd_mysql p_drbd_mysql \

meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"

clone cl_ping p_ping \

meta interleave="true"

location cli-prefer-g_mysql g_mysql \

rule $id="cli-prefer-rule-g_mysql" inf: #uname eq host1.localdomain

location l_drbd_master_on_ping ms_drbd_mysql \

rule $id="l_drbd_master_on_ping-rule" $role="Master" -inf: not_defined ping or ping number:lte 0

colocation c_mysql_on_drbd inf: g_mysql ms_drbd_mysql:Master

order o_drbd_before_mysql inf: ms_drbd_mysql:promote g_mysql:start

property $id="cib-bootstrap-options" \

dc-version="1.1.8-7.el6-394e906" \

cluster-infrastructure="classic openais (with plugin)" \

expected-quorum-votes="2" \

no-quorum-policy="ignore" \

stonith-enabled="false"

rsc_defaults $id="rsc-options" \

resource-stickiness="100"

===============corosync.conf=========

compatibility: whitetank

totem {

version: 2

secauth: off

threads: 0

interface {

ringnumber: 0

bindnetaddr: 10.0.0.0

mcastaddr: 226.99.1.1

mcastport: 4000

ttl: 1

}

}

logging {

fileline: off

to_stderr: no

to_logfile: yes

to_syslog: yes

logfile: /var/log/cluster/corosync.log

debug: off

timestamp: on

logger_subsys {

subsys: AMF

debug: off

}

}

amf {

mode: disabled

}

=====================pcmk===========

service {

name: pacemaker

ver: 1

}

===============clusterdb_res.res==============

resource clusterdb_res {

protocol C;

handlers {

pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger; reboot -f";

pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger; reboot -f";

local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger; halt -f";

}

startup {

degr-wfc-timeout 120;

outdated-wfc-timeout 2;

}

disk {

on-io-error detach;

}

net {

cram-hmac-alg "sha1";

shared-secret "clusterdb";

after-sb-0pri disconnect;

after-sb-1pri disconnect;

after-sb-2pri disconnect;

rr-conflict disconnect;

}

syncer {

rate 100M;

al-extents 257;

on-no-data-accessible io-error;

}

on host1.localdomain {

device /dev/drbd0;

disk /dev/vda3;

address 10.0.0.10:7788;

flexible-meta-disk internal;

}

on host2.localdomain {

device /dev/drbd0;

disk /dev/vda3;

address 10.0.0.11:7788;

meta-disk internal; } }

Thanks in advance.

BR, ehung lu

edit retag flag offensive close merge delete

Comments

it's not clear to me what you're trying to do. I suggest you not to post the configuration files here (it makes it hard to read the message -use paste.openstack.org and link here) and be more verbose about the openstack-related part of the problems.

smaffulli gravatar imagesmaffulli ( 2013-07-12 18:48:34 -0500 )edit

are you trying to deply mysql HA on instances?

medhat gravatar imagemedhat ( 2013-08-23 22:26:15 -0500 )edit

Hi,

I am also planning to have a similar setup in my openstack environment. Could you please tell me how did you configured virtual IP in your instances?

roshan.tn gravatar imageroshan.tn ( 2014-07-15 21:01:18 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-10-02 21:42:37 -0500

jtaguinerd gravatar image

Check security group first. See if icmp is allowed. Make sure to allow also all the other ports you are using. You need to reserve the fixed ip you used for VIP in nova, so that the next time you launch instance it will not get assigned.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2013-07-09 02:26:45 -0500

Seen: 598 times

Last updated: Jul 09 '13