Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-23 Thread Sławek Kapłoński
Hello, Dnia poniedziałek, 22 września 2014 22:02:26 Sławek Kapłoński pisze: > Hello, > > Answears below > > --- > Best regards > Sławek Kapłoński > sla...@kaplonski.pl > > Dnia poniedziałek, 22 września 2014 13:41:51 Jay Pipes pisze: > > Hi Peter, Sławek, answers inline... > > > > On 09/22/20

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-23 Thread Emrah Aslan
-operators@lists.openstack.org Subject: Re: [Openstack-operators] Openstack and mysql galera with haproxy Hello, Answears below --- Best regards Sławek Kapłoński sla...@kaplonski.pl Dnia poniedziałek, 22 września 2014 13:41:51 Jay Pipes pisze: > Hi Peter, Sławek, answers inline... > > On 09/22/2

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-22 Thread Sławek Kapłoński
Hello, Answears below --- Best regards Sławek Kapłoński sla...@kaplonski.pl Dnia poniedziałek, 22 września 2014 13:41:51 Jay Pipes pisze: > Hi Peter, Sławek, answers inline... > > On 09/22/2014 08:12 AM, Peter Boros wrote: > > Hi, > > > > StaleDataError is not given by MySQL, but rather SQLAlc

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-22 Thread Jay Pipes
Hi Peter, Sławek, answers inline... On 09/22/2014 08:12 AM, Peter Boros wrote: Hi, StaleDataError is not given by MySQL, but rather SQLAlchemy. After a quick look, it seems like SQLAlchemy gets this, if the update updated different number of rows then it expected. I am not sure what is the expe

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-22 Thread Peter Boros
Hi, StaleDataError is not given by MySQL, but rather SQLAlchemy. After a quick look, it seems like SQLAlchemy gets this, if the update updated different number of rows then it expected. I am not sure what is the expectation based on, perhaps soembody can chime in and we can put this together. What

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-22 Thread Sławek Kapłoński
Hello, Thanks for Your explanations. I thought so and now I decrease "idle_connection_timeout" in neutron and nova. Now when master server is back to cluster than in less than one minute all conections are again made to this master node becuase old connections which was made to backup node are

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-22 Thread Peter Boros
Hi, Let me answer this and one of your previous questions in one because they are related. Earlier you wrote: > I made such modifications today in my infra and generally it looks > better now. I don't see deadlocks. But I have one more problem with > that: generally it works fine when main node i

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-19 Thread Sławek Kapłoński
Hello, New questions below --- Best regards Sławek Kapłoński sla...@kaplonski.pl Dnia czwartek, 18 września 2014 09:45:21 Clint Byrum pisze: > Excerpts from Sławek Kapłoński's message of 2014-09-18 09:29:27 -0700: > > Hello, > > > > Is anyone here using openstack with mysql galera and haproxy?

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-19 Thread Sławek Kapłoński
Hello, W dniu 2014-09-18 18:45, Clint Byrum napisał(a): Excerpts from Sławek Kapłoński's message of 2014-09-18 09:29:27 -0700: Hello, Is anyone here using openstack with mysql galera and haproxy? Have You got any problems with that? I was today installed such ha infra for database (two mysql

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-19 Thread Sławek Kapłoński
Hello, I made such modifications today in my infra and generally it looks better now. I don't see deadlocks. But I have one more problem with that: generally it works fine when main node is active but in situation when this node is down, haproxy connect to one of backup nodes. Still all is ok

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Abel Lopez
One big win is that using xtrabackup (or xtrabackup_v2 if you’re on 5.6) is that your tables don’t lock momentarily like they do using rsync. At my previous shop, we had a replicated keystone db across various sites, so wan segments (gmcast.segment ) became an attractive way to speed replication.

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Clint Byrum
Excerpts from Sławek Kapłoński's message of 2014-09-18 12:34:53 -0700: > Hello, > > Thanks all of You guys for help. I will try to apply that percona's scripts > and configure it in active/pasive mode. > About "mysql has gone away" I thought so it is not big problem but it looks > "ugly" in logs

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Sławek Kapłoński
Hello, Thanks all of You guys for help. I will try to apply that percona's scripts and configure it in active/pasive mode. About "mysql has gone away" I thought so it is not big problem but it looks "ugly" in logs Simon - I think that it is not related strictly to neutron and similar problems

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Simon McCartney
We're using haproxy in front of a 3 node galera cluster, and we see the lost connection stuff pretty often, but that's normal behaviour, MySQL will tear down idle connections, SQLA handles reconnecting fine. As for deadlocks, if you are distributing writes across your nodes, I'd expect that, we

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Warren Wang
If you want to use Galera + mysql, make sure you have haproxy set to prefer a single host, otherwise you will have deadlocking problems. I know it kind of defeats the purpose of having an all active database setup, but that's what we've had to do. My other advice would be to use SSDs if you can aff

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Clint Byrum
Excerpts from Sławek Kapłoński's message of 2014-09-18 09:29:27 -0700: > Hello, > > Is anyone here using openstack with mysql galera and haproxy? Have You got > any > problems with that? > I was today installed such ha infra for database (two mysql servers in galera > cluster and haproxy on con

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Joe Topjian
Hello, I'm using MySQL (Percona) and Galera with HAProxy and have previously run into the same issues you describe. The first thing to mention is "SELECT ... FOR UPDATE" queries do not work well with multi-master environments. This was discovered during discussion at the OpenStack Atlanta Summit.

Re: [Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Abel Lopez
I’ve seen that error, but not specifically with HAProxy (I was using an F5 at the time) IIRC, the problem was with my connection checking. I assume you’re doing something similar to this: http://www.percona.com/doc/percona-xtradb-cluster/5.5/howtos/haproxy.html On Sep 18, 2014, at 9:29 AM, Sławe

[Openstack-operators] Openstack and mysql galera with haproxy

2014-09-18 Thread Sławek Kapłoński
Hello, Is anyone here using openstack with mysql galera and haproxy? Have You got any problems with that? I was today installed such ha infra for database (two mysql servers in galera cluster and haproxy on controller and neutron node, this haproxy is connecting to one of galera servers with ro