You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Adrian Lewis <ad...@alsiconsulting.co.uk> on 2014/06/06 03:16:21 UTC

Examples of configuring DB HA?

Hi all,



Does anyone have any example configs or blog posts explaining the DB HA
features introduced in 4.3? Between the section in the design docs on the
wiki and the official docs, I’m a little confused as to how it’s supposed
to be set up – they appear to differ although there’s a lot more detail in
the design docs. Some of it is clearly MySQL stuff that’s outside of
Cloudstack but some of it is Cloudstack config as well. I’m just trying to
get a feel for what is the best way to use what’s made it into 4.3 final
(if different to the design docs). I’m not too strong on MySQL so I can’t
easily work out what’s a requirement, what’s just recommended (and
implications) and what the Cloudstack side actually does. Is the CS side
purely for failover or does it actually set up part of the replication for
you? Can you easily enable an existing DB for HA or is this best done
before there’s any data? Before you run cloudstack-setup-databases?



Shanker – I don’t suppose this subject could add to your already excellent
blog post collection?



Thanks in advance,



Adrian

Re: Examples of configuring DB HA?

Posted by Shanker Balan <sh...@shapeblue.com>.
Hi Adrian,

comments inline.

On 06-Jun-2014, at 6:46 am, Adrian Lewis <ad...@alsiconsulting.co.uk> wrote:

> Hi all,
>
> Does anyone have any example configs or blog posts explaining the DB HA
> features introduced in 4.3? Between the section in the design docs on the
> wiki and the official docs, I’m a little confused as to how it’s supposed
> to be set up – they appear to differ although there’s a lot more detail in
> the design docs. Some of it is clearly MySQL stuff that’s outside of
> Cloudstack but some of it is Cloudstack config as well. I’m just trying to
> get a feel for what is the best way to use what’s made it into 4.3 final
> (if different to the design docs). I’m not too strong on MySQL so I can’t
> easily work out what’s a requirement, what’s just recommended (and
> implications) and what the Cloudstack side actually does. Is the CS side
> purely for failover or does it actually set up part of the replication for
> you? Can you easily enable an existing DB for HA or is this best done
> before there’s any data? Before you run cloudstack-setup-databases?

I had a cursory look at the DB HA capabilities in ACS 4.3.0 when it was released.
The DB HA is actually a feature of MySQL JDBC(?) drivers that ACS is compiled where
one can provide a list of mysql masters instead of a single MySQL server.

The configration simply be as simple as installing a MySQL clustering
suite (Galera/Percona Cluster/other MySQL clustering solutions) and then
running the cloudstack-setup-* as usual pointing to one of the DB masters.

Once the cloudstack-setup-* is completed, edit the config file and update
the DB list with all the masters. IIRC, these are comma separeted.

> Shanker – I don’t suppose this subject could add to your already excellent
> blog post collection?


Excellent suggestion. Let me give Galera a shot over the weekend.

Regards.
@shankerbalan


--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: Examples of configuring DB HA?

Posted by "Hollman Enciso R." <ho...@gmail.com>.
On Thu, Jun 5, 2014 at 8:16 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> Hi all,
>
>
>
> Does anyone have any example configs or blog posts explaining the DB HA
> features introduced in 4.3? Between the section in the design docs on the
> wiki and the official docs, I’m a little confused as to how it’s supposed
> to be set up – they appear to differ although there’s a lot more detail in
> the design docs. Some of it is clearly MySQL stuff that’s outside of
> Cloudstack but some of it is Cloudstack config as well. I’m just trying to
> get a feel for what is the best way to use what’s made it into 4.3 final
> (if different to the design docs). I’m not too strong on MySQL so I can’t
> easily work out what’s a requirement, what’s just recommended (and
> implications) and what the Cloudstack side actually does. Is the CS side
> purely for failover or does it actually set up part of the replication for
> you? Can you easily enable an existing DB for HA or is this best done
> before there’s any data? Before you run cloudstack-setup-databases?
>
>
>
> Shanker – I don’t suppose this subject could add to your already excellent
> blog post collection?
>
>
>
> Thanks in advance,
>

Hi. i have the same problem/restlessness and i think the same about the
doc. On this part it's a little confused.

I identify that you need to install all the management-servers before
deploy the mySQL HA, for example if you will think to add a new management
server after de MySQL HA it's not possible if so will erase all data from
the DB (on my personal experience)

so my  step by step was:

install the management server's accord the official 4.3 doc

install mysql server on the 2 database servers (master and slave)

#yum install mysql-server

edit the MySQL configuration /etc/my.cnf q

MASTER

[mysqld]

innodb_rollback_on_timeout=1

innodb_lock_wait_timeout=600

max_connections=700

binlog-format = 'ROW'

bind-address = 0.0.0.0

datadir=/var/lib/mysql

log-bin=mysql-bin

server_id=1

SLAVE

[mysqld]

innodb_rollback_on_timeout=1

innodb_lock_wait_timeout=600

max_connections=700

binlog-format = 'ROW'

datadir=/var/lib/mysql

server_id=2

log-bin=mysql-bi

On both servers grant privileges to root account


mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.x.%' WITH GRANT OPTION;

now add an account for replication

# mysql -u root
mysql> create user 'cloud-repl'@'192.168.1.%' identified by 'password';
mysql> grant replication slave on *.* TO 'cloud-repl'@'192.168.1.%';
mysql> flush privileges;
mysql> flush tables with read lock;

On master:

mysql> show master status;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 |      412 |              |                  |
+------------------+----------+--------------+------------------+

“don't forget the file and the position”

then

mysql> unlock tables;

on the Slave:

mysql> change master to
    -> master_host='192.168.1.16',
    -> master_user='cloud-repl',
    -> master_password='password',
    -> master_log_file='mysql-bin.000001',
    -> master_log_pos=412;

now start the slave:


mysql> start slave;

I have 3 management servers with a  centralised database on cluster

I will write a blogpost in a few days with all the process.

some references:

http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/choosing_deployment_architecture.html

http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/installation.html?highlight=separate%20node#install-database-on-separate-node

http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/reliability.html?highlight=high%20availability#database-high-availability

-- 
Hollman Eduardo Enciso R.
http://algolibre.com
@hollman

RE: Examples of configuring DB HA?

Posted by Damoder Reddy <Da...@citrix.com>.
The master/master(2-way replication) replication of MySQL server gives you HA when one DB server goes down as failover is configured at Management Server side.. Once the DB is up it will catch up the events that are logged on the second DB. 
In case of failover configured the management server will not fence self, instead it will try to connect to the another db in the list configured.

Again mysql clustering is on data nodes not on the mysql nodes so Cloud Stack will fence itself if sees a down of mysql node.

Thanks & Regards
Damodar/


-----Original Message-----
From: Shanker Balan [mailto:shanker.balan@shapeblue.com] 
Sent: Friday, June 6, 2014 11:48 AM
To: CloudStack-Users
Subject: Re: Examples of configuring DB HA?

Hi Damodar,

Comments inline.

On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com> wrote:

> Hi Adrian,
>
> For your question, . Is the CS side purely for failover or does it actually set up part of the replication for you? The answer is, the Cloud Stack does only failover configuration and the actual replication process on the mysql side has to be done by own.


https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207

> For the second question, Can you easily enable an existing DB for HA or is this best done before there's any data? The answer is, we can setup replication even with existing data and then start the management servers. The mysql documentation contains the clear steps how to setup replication with existing documentation. Probably that is the reason why we might not have included these steps in the doc.
>


The OP is looking for HA, not failover. HA is possible in ACS 4.3.0 using MySQL Clustering.

Once you have MySQL Clustering, its multi-master and not one master to many slaves.
ACS should not fence itself like it currently does when the master is not available.


> The configuraiton we need to do on each management server is as below.
>
> You can follow the design doc steps if you think there is a minimal documentation in the 4.3 doc. The design doc also contains the links to mysql site for setting up the replication for fresh as well as existing setups.
>
> From the cloud stack side it is purely failover and falling back between the IPs configured for the master/salve databases.
>

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207



> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: Friday, June 6, 2014 6:46 AM
> To: users@cloudstack.apache.org
> Subject: Examples of configuring DB HA?
>
> Hi all,
>
>
>
> Does anyone have any example configs or blog posts explaining the DB 
> HA features introduced in 4.3? Between the section in the design docs 
> on the wiki and the official docs, I'm a little confused as to how 
> it's supposed to be set up - they appear to differ although there's a 
> lot more detail in the design docs. Some of it is clearly MySQL stuff 
> that's outside of Cloudstack but some of it is Cloudstack config as 
> well. I'm just trying to get a feel for what is the best way to use 
> what's made it into 4.3 final (if different to the design docs). I'm 
> not too strong on MySQL so I can't easily work out what's a 
> requirement, what's just recommended (and
> implications) and what the Cloudstack side actually does. Is the CS side purely for failover or does it actually set up part of the replication for you? Can you easily enable an existing DB for HA or is this best done before there's any data? Before you run cloudstack-setup-databases?
>
>
>
> Shanker - I don't suppose this subject could add to your already excellent blog post collection?
>
>
>
> Thanks in advance,
>
>
>
> Adrian

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867 shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge - rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
https://issues.apache.org/jira/browse/CLOUDSTACK-6892

Major or Critical?

Any idea when we are likely to see a 4.3.1 release?

-----Original Message-----
From: Damoder Reddy [mailto:Damoder.Reddy@citrix.com]
Sent: 11 June 2014 07:30
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

Hi Lewis,

This is a potential bug if by default it is missing from
catalina.properties. Can you please file a defect for this so that we can
fix this for 4.3.1 release. Looks like we did not change the
catalina.properties while refactoring out the mysql connector part.

Thanks & Regards
Damodar/

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: Tuesday, June 10, 2014 3:57 PM
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

Hi Damoder,

Thank you so much for this. I'm not sure if I've done it properly but I
added the full path of..

/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar

..onto the end of a line in..

/etc/cloudstack/management/catalina.properties

..that started as...

common.loader=${catalina.base}/lib,${catalina.base}/lib...

.. and after a restart of the management server it worked!

Can you let me know if this is the proper way to do this? Is this a bug of
some sort or is there something odd about my particular environment that has
caused this? Should this be addressed for a potential 4.3.1 release?

Many thanks again,

Adrian

-----Original Message-----
From: Damoder Reddy [mailto:Damoder.Reddy@citrix.com]
Sent: 10 June 2014 05:48
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I think the issue here is the mysql connector jar is loaded using tomcat's
common class loader  and the jar "cloud-plugin-database-mysqlha-4.3.0.jar"
is loaded by the webapp class loader and the reason being

Mysql connector is loaded using common class loader it does not have
visibility into webapp class loader. Ideally the jar
cloud-plugin-database-mysqlha-4.3.0.jar should also be loaded from the
common class loader instead of webapp class loader.

Can you try to load the jar "cloud-plugin-database-mysqlha-4.3.0.jar" in
common.loader.

Thanks & Regards
Damodar/


-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: Tuesday, June 10, 2014 5:59 AM
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I don’t fully understand what I'm doing here but here's something that
puzzles me:

[root@cs-mgmt ~]# jar tf
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/cloud/
com/cloud/utils/
com/cloud/utils/db/
com/cloud/utils/db/StaticStrategy.class
META-INF/NOTICE
META-INF/DEPENDENCIES
META-INF/LICENSE
META-INF/maven/
META-INF/maven/org.apache.cloudstack/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.xml
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.properties
[root@cs-mgmt ~]#

Surely there's the class and that path is where a lot of other
cloudstack-related jar files live so I'm guessing that is also in the
classpath.

Anyone?

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: 10 June 2014 00:05
To: 'users@cloudstack.apache.org'
Subject: RE: Examples of configuring DB HA?

Fresh 4.3 from the RPMs in the repo. Done yesterday. Had to yum install
mysql on the management server as the client binaries weren't present but
mysql-connector-java was installed as a dependency of the cloudstack rpm.
Could something else be missing on the Centos side or does this look like a
CS issue?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 10 June 2014 00:01
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

the last question is the proper one.. ;) Probably because someone forgot it.
I also hate when this kind of thing happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade from
an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar
> that contains the class isn’t already in the classpath and what's the
> best way to fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains
> the classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a
> consequence of a class not found exception. Find the jar that contains
> the classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis
> <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos
> > 6.5 – 2 x sql servers and 1 mgmt server – all running in VMware
> > Workstation, installed from 4.3 repo) but when setting the
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404
> > from tomcat and the management server log has lines in it saying
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list
> > but nothing that I can see as an answer. I’m just a lowly network
> > engineer so wouldn’t know what these errors mean but I’m guessing I
> > won’t be the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as
> > much the same. Based on what I had read about the new changes in
> > 4.3, I had assumed that the new feature allows you to configure
> > standard MySQL (clustering not required - Galera or otherwise) in a
> > multimaster replication setup and that while management servers only
> > speak with a single server at a time, failover to a backup server is
> > automatic and does not need any work on the MySQL side to promote a
> > slave to a master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply
> > having a hot standby DB that takes over automatically. This is what
> > I take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment
> > and offset values ensure that the two DBs can safely run as
> > master-master in the event that each gets written to concurrently
> > (split brain or just two mgmt servers failing over at slightly
> > different times).
> >
> > It seems that this thread is already highlighting some of the
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy
> > <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the
> > Cloud Stack does only failover configuration and the actual
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for
> > > HA or
> > is this best done before there’s any data? The answer is, we can
> > setup replication even with existing data and then start the
> > management
> servers.
> > The mysql documentation contains the clear steps how to setup
> > replication with existing documentation. Probably that is the reason
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master
> > to many slaves.
> > ACS should not fence itself like it currently does when the master
> > is not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a
> > > minimal
> > documentation in the 4.3 doc. The design doc also contains the links
> > to mysql site for setting up the replication for fresh as well as
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the
> > > DB HA
> > features introduced in 4.3? Between the section in the design docs
> > on the wiki and the official docs, I’m a little confused as to how
> > it’s supposed to be set up – they appear to differ although there’s
> > a lot more detail in the design docs. Some of it is clearly MySQL
> > stuff that’s outside of Cloudstack but some of it is Cloudstack
> > config as well. I’m just trying to get a feel for what is the best
> > way to use what’s made it into 4.3 final (if different to the design
> > docs). I’m not too strong on MySQL so I can’t easily work out what’s
> > a requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the
> > > CS side
> > purely for failover or does it actually set up part of the
> > replication for you? Can you easily enable an existing DB for HA or
> > is this best done before there’s any data? Before you run
> > cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867
> > shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India
> > | LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and
> > do not necessarily represent those of Shape Blue Ltd or related
> > companies. If you are not the intended recipient of this email, you
> > must neither take any action based upon its contents, nor copy or
> > show it to anyone. Please contact the sender if you believe you have
> > received this email in error. Shape Blue Ltd is a company
> > incorporated in England & Wales. ShapeBlue Services India LLP is a
> > company incorporated in India and is operated under license from
> > Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company
> > incorporated in Brasil and is operated under license from Shape Blue
> > Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



--
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Damoder Reddy <Da...@citrix.com>.
Hi Lewis,

This is a potential bug if by default it is missing from catalina.properties. Can you please file a defect for this so that we can fix this for 4.3.1 release. Looks like we did not change the catalina.properties while refactoring out the mysql connector part.

Thanks & Regards
Damodar/

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk] 
Sent: Tuesday, June 10, 2014 3:57 PM
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

Hi Damoder,

Thank you so much for this. I'm not sure if I've done it properly but I added the full path of..

/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar

..onto the end of a line in..

/etc/cloudstack/management/catalina.properties

..that started as...

common.loader=${catalina.base}/lib,${catalina.base}/lib...

.. and after a restart of the management server it worked!

Can you let me know if this is the proper way to do this? Is this a bug of some sort or is there something odd about my particular environment that has caused this? Should this be addressed for a potential 4.3.1 release?

Many thanks again,

Adrian

-----Original Message-----
From: Damoder Reddy [mailto:Damoder.Reddy@citrix.com]
Sent: 10 June 2014 05:48
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I think the issue here is the mysql connector jar is loaded using tomcat's common class loader  and the jar "cloud-plugin-database-mysqlha-4.3.0.jar"
is loaded by the webapp class loader and the reason being

Mysql connector is loaded using common class loader it does not have visibility into webapp class loader. Ideally the jar cloud-plugin-database-mysqlha-4.3.0.jar should also be loaded from the common class loader instead of webapp class loader.

Can you try to load the jar "cloud-plugin-database-mysqlha-4.3.0.jar" in common.loader.

Thanks & Regards
Damodar/


-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: Tuesday, June 10, 2014 5:59 AM
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I don’t fully understand what I'm doing here but here's something that puzzles me:

[root@cs-mgmt ~]# jar tf
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/cloud/
com/cloud/utils/
com/cloud/utils/db/
com/cloud/utils/db/StaticStrategy.class
META-INF/NOTICE
META-INF/DEPENDENCIES
META-INF/LICENSE
META-INF/maven/
META-INF/maven/org.apache.cloudstack/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.xml
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.properties
[root@cs-mgmt ~]#

Surely there's the class and that path is where a lot of other cloudstack-related jar files live so I'm guessing that is also in the classpath.

Anyone?

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: 10 June 2014 00:05
To: 'users@cloudstack.apache.org'
Subject: RE: Examples of configuring DB HA?

Fresh 4.3 from the RPMs in the repo. Done yesterday. Had to yum install mysql on the management server as the client binaries weren't present but mysql-connector-java was installed as a dependency of the cloudstack rpm.
Could something else be missing on the Centos side or does this look like a CS issue?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 10 June 2014 00:01
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

the last question is the proper one.. ;) Probably because someone forgot it.
I also hate when this kind of thing happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade from an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar 
> that contains the class isn’t already in the classpath and what's the 
> best way to fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains 
> the classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a 
> consequence of a class not found exception. Find the jar that contains 
> the classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis 
> <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos
> > 6.5 – 2 x sql servers and 1 mgmt server – all running in VMware 
> > Workstation, installed from 4.3 repo) but when setting the 
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404 
> > from tomcat and the management server log has lines in it saying 
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null) 
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy 
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list 
> > but nothing that I can see as an answer. I’m just a lowly network 
> > engineer so wouldn’t know what these errors mean but I’m guessing I 
> > won’t be the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as 
> > much the same. Based on what I had read about the new changes in 
> > 4.3, I had assumed that the new feature allows you to configure 
> > standard MySQL (clustering not required - Galera or otherwise) in a 
> > multimaster replication setup and that while management servers only 
> > speak with a single server at a time, failover to a backup server is 
> > automatic and does not need any work on the MySQL side to promote a 
> > slave to a master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply 
> > having a hot standby DB that takes over automatically. This is what 
> > I take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment 
> > and offset values ensure that the two DBs can safely run as 
> > master-master in the event that each gets written to concurrently 
> > (split brain or just two mgmt servers failing over at slightly 
> > different times).
> >
> > It seems that this thread is already highlighting some of the 
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy 
> > <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the 
> > Cloud Stack does only failover configuration and the actual 
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for 
> > > HA or
> > is this best done before there’s any data? The answer is, we can 
> > setup replication even with existing data and then start the 
> > management
> servers.
> > The mysql documentation contains the clear steps how to setup 
> > replication with existing documentation. Probably that is the reason 
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0 
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master 
> > to many slaves.
> > ACS should not fence itself like it currently does when the master 
> > is not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a 
> > > minimal
> > documentation in the 4.3 doc. The design doc also contains the links 
> > to mysql site for setting up the replication for fresh as well as 
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back 
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the 
> > > DB HA
> > features introduced in 4.3? Between the section in the design docs 
> > on the wiki and the official docs, I’m a little confused as to how 
> > it’s supposed to be set up – they appear to differ although there’s 
> > a lot more detail in the design docs. Some of it is clearly MySQL 
> > stuff that’s outside of Cloudstack but some of it is Cloudstack 
> > config as well. I’m just trying to get a feel for what is the best 
> > way to use what’s made it into 4.3 final (if different to the design 
> > docs). I’m not too strong on MySQL so I can’t easily work out what’s 
> > a requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the 
> > > CS side
> > purely for failover or does it actually set up part of the 
> > replication for you? Can you easily enable an existing DB for HA or 
> > is this best done before there’s any data? Before you run 
> > cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867 
> > shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India 
> > | LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related 
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses< 
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are 
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and 
> > do not necessarily represent those of Shape Blue Ltd or related 
> > companies. If you are not the intended recipient of this email, you 
> > must neither take any action based upon its contents, nor copy or 
> > show it to anyone. Please contact the sender if you believe you have 
> > received this email in error. Shape Blue Ltd is a company 
> > incorporated in England & Wales. ShapeBlue Services India LLP is a 
> > company incorporated in India and is operated under license from 
> > Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company 
> > incorporated in Brasil and is operated under license from Shape Blue 
> > Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



--
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
Hi Damoder,

Thank you so much for this. I'm not sure if I've done it properly but I
added the full path of..

/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar

..onto the end of a line in..

/etc/cloudstack/management/catalina.properties

..that started as...

common.loader=${catalina.base}/lib,${catalina.base}/lib...

.. and after a restart of the management server it worked!

Can you let me know if this is the proper way to do this? Is this a bug of
some sort or is there something odd about my particular environment that has
caused this? Should this be addressed for a potential 4.3.1 release?

Many thanks again,

Adrian

-----Original Message-----
From: Damoder Reddy [mailto:Damoder.Reddy@citrix.com]
Sent: 10 June 2014 05:48
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I think the issue here is the mysql connector jar is loaded using tomcat's
common class loader  and the jar "cloud-plugin-database-mysqlha-4.3.0.jar"
is loaded by the webapp class loader and the reason being

Mysql connector is loaded using common class loader it does not have
visibility into webapp class loader. Ideally the jar
cloud-plugin-database-mysqlha-4.3.0.jar should also be loaded from the
common class loader instead of webapp class loader.

Can you try to load the jar "cloud-plugin-database-mysqlha-4.3.0.jar" in
common.loader.

Thanks & Regards
Damodar/


-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: Tuesday, June 10, 2014 5:59 AM
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I don’t fully understand what I'm doing here but here's something that
puzzles me:

[root@cs-mgmt ~]# jar tf
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/cloud/
com/cloud/utils/
com/cloud/utils/db/
com/cloud/utils/db/StaticStrategy.class
META-INF/NOTICE
META-INF/DEPENDENCIES
META-INF/LICENSE
META-INF/maven/
META-INF/maven/org.apache.cloudstack/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.xml
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.properties
[root@cs-mgmt ~]#

Surely there's the class and that path is where a lot of other
cloudstack-related jar files live so I'm guessing that is also in the
classpath.

Anyone?

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: 10 June 2014 00:05
To: 'users@cloudstack.apache.org'
Subject: RE: Examples of configuring DB HA?

Fresh 4.3 from the RPMs in the repo. Done yesterday. Had to yum install
mysql on the management server as the client binaries weren't present but
mysql-connector-java was installed as a dependency of the cloudstack rpm.
Could something else be missing on the Centos side or does this look like a
CS issue?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 10 June 2014 00:01
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

the last question is the proper one.. ;) Probably because someone forgot it.
I also hate when this kind of thing happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade from
an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar
> that contains the class isn’t already in the classpath and what's the
> best way to fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains
> the classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a
> consequence of a class not found exception. Find the jar that contains
> the classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis
> <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos
> > 6.5 – 2 x sql servers and 1 mgmt server – all running in VMware
> > Workstation, installed from 4.3 repo) but when setting the
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404
> > from tomcat and the management server log has lines in it saying
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list
> > but nothing that I can see as an answer. I’m just a lowly network
> > engineer so wouldn’t know what these errors mean but I’m guessing I
> > won’t be the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as
> > much the same. Based on what I had read about the new changes in
> > 4.3, I had assumed that the new feature allows you to configure
> > standard MySQL (clustering not required - Galera or otherwise) in a
> > multimaster replication setup and that while management servers only
> > speak with a single server at a time, failover to a backup server is
> > automatic and does not need any work on the MySQL side to promote a
> > slave to a master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply
> > having a hot standby DB that takes over automatically. This is what
> > I take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment
> > and offset values ensure that the two DBs can safely run as
> > master-master in the event that each gets written to concurrently
> > (split brain or just two mgmt servers failing over at slightly
> > different times).
> >
> > It seems that this thread is already highlighting some of the
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy
> > <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the
> > Cloud Stack does only failover configuration and the actual
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for
> > > HA or
> > is this best done before there’s any data? The answer is, we can
> > setup replication even with existing data and then start the
> > management
> servers.
> > The mysql documentation contains the clear steps how to setup
> > replication with existing documentation. Probably that is the reason
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master
> > to many slaves.
> > ACS should not fence itself like it currently does when the master
> > is not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a
> > > minimal
> > documentation in the 4.3 doc. The design doc also contains the links
> > to mysql site for setting up the replication for fresh as well as
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the
> > > DB HA
> > features introduced in 4.3? Between the section in the design docs
> > on the wiki and the official docs, I’m a little confused as to how
> > it’s supposed to be set up – they appear to differ although there’s
> > a lot more detail in the design docs. Some of it is clearly MySQL
> > stuff that’s outside of Cloudstack but some of it is Cloudstack
> > config as well. I’m just trying to get a feel for what is the best
> > way to use what’s made it into 4.3 final (if different to the design
> > docs). I’m not too strong on MySQL so I can’t easily work out what’s
> > a requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the
> > > CS side
> > purely for failover or does it actually set up part of the
> > replication for you? Can you easily enable an existing DB for HA or
> > is this best done before there’s any data? Before you run
> > cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867
> > shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India
> > | LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and
> > do not necessarily represent those of Shape Blue Ltd or related
> > companies. If you are not the intended recipient of this email, you
> > must neither take any action based upon its contents, nor copy or
> > show it to anyone. Please contact the sender if you believe you have
> > received this email in error. Shape Blue Ltd is a company
> > incorporated in England & Wales. ShapeBlue Services India LLP is a
> > company incorporated in India and is operated under license from
> > Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company
> > incorporated in Brasil and is operated under license from Shape Blue
> > Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



--
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Damoder Reddy <Da...@citrix.com>.
I think the issue here is the mysql connector jar is loaded using tomcat's common class loader  and the jar "cloud-plugin-database-mysqlha-4.3.0.jar" is loaded by the webapp class loader and the reason being

Mysql connector is loaded using common class loader it does not have visibility into webapp class loader. Ideally the jar cloud-plugin-database-mysqlha-4.3.0.jar should also be loaded from the common class loader instead of webapp class loader. 

Can you try to load the jar "cloud-plugin-database-mysqlha-4.3.0.jar" in common.loader.

Thanks & Regards
Damodar/


-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk] 
Sent: Tuesday, June 10, 2014 5:59 AM
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I don’t fully understand what I'm doing here but here's something that puzzles me:

[root@cs-mgmt ~]# jar tf
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/cloud/
com/cloud/utils/
com/cloud/utils/db/
com/cloud/utils/db/StaticStrategy.class
META-INF/NOTICE
META-INF/DEPENDENCIES
META-INF/LICENSE
META-INF/maven/
META-INF/maven/org.apache.cloudstack/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.xml
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.properties
[root@cs-mgmt ~]#

Surely there's the class and that path is where a lot of other cloudstack-related jar files live so I'm guessing that is also in the classpath.

Anyone?

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: 10 June 2014 00:05
To: 'users@cloudstack.apache.org'
Subject: RE: Examples of configuring DB HA?

Fresh 4.3 from the RPMs in the repo. Done yesterday. Had to yum install mysql on the management server as the client binaries weren't present but mysql-connector-java was installed as a dependency of the cloudstack rpm.
Could something else be missing on the Centos side or does this look like a CS issue?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 10 June 2014 00:01
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

the last question is the proper one.. ;) Probably because someone forgot it.
I also hate when this kind of thing happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade from an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar 
> that contains the class isn’t already in the classpath and what's the 
> best way to fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains 
> the classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a 
> consequence of a class not found exception. Find the jar that contains 
> the classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis 
> <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos
> > 6.5 – 2 x sql servers and 1 mgmt server – all running in VMware 
> > Workstation, installed from 4.3 repo) but when setting the 
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404 
> > from tomcat and the management server log has lines in it saying 
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null) 
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy 
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list 
> > but nothing that I can see as an answer. I’m just a lowly network 
> > engineer so wouldn’t know what these errors mean but I’m guessing I 
> > won’t be the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as 
> > much the same. Based on what I had read about the new changes in 
> > 4.3, I had assumed that the new feature allows you to configure 
> > standard MySQL (clustering not required - Galera or otherwise) in a 
> > multimaster replication setup and that while management servers only 
> > speak with a single server at a time, failover to a backup server is 
> > automatic and does not need any work on the MySQL side to promote a 
> > slave to a master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply 
> > having a hot standby DB that takes over automatically. This is what 
> > I take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment 
> > and offset values ensure that the two DBs can safely run as 
> > master-master in the event that each gets written to concurrently 
> > (split brain or just two mgmt servers failing over at slightly 
> > different times).
> >
> > It seems that this thread is already highlighting some of the 
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy 
> > <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the 
> > Cloud Stack does only failover configuration and the actual 
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for 
> > > HA or
> > is this best done before there’s any data? The answer is, we can 
> > setup replication even with existing data and then start the 
> > management
> servers.
> > The mysql documentation contains the clear steps how to setup 
> > replication with existing documentation. Probably that is the reason 
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0 
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master 
> > to many slaves.
> > ACS should not fence itself like it currently does when the master 
> > is not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a 
> > > minimal
> > documentation in the 4.3 doc. The design doc also contains the links 
> > to mysql site for setting up the replication for fresh as well as 
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back 
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the 
> > > DB HA
> > features introduced in 4.3? Between the section in the design docs 
> > on the wiki and the official docs, I’m a little confused as to how 
> > it’s supposed to be set up – they appear to differ although there’s 
> > a lot more detail in the design docs. Some of it is clearly MySQL 
> > stuff that’s outside of Cloudstack but some of it is Cloudstack 
> > config as well. I’m just trying to get a feel for what is the best 
> > way to use what’s made it into 4.3 final (if different to the design 
> > docs). I’m not too strong on MySQL so I can’t easily work out what’s 
> > a requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the 
> > > CS side
> > purely for failover or does it actually set up part of the 
> > replication for you? Can you easily enable an existing DB for HA or 
> > is this best done before there’s any data? Before you run 
> > cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867 
> > shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India 
> > | LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related 
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses< 
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are 
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and 
> > do not necessarily represent those of Shape Blue Ltd or related 
> > companies. If you are not the intended recipient of this email, you 
> > must neither take any action based upon its contents, nor copy or 
> > show it to anyone. Please contact the sender if you believe you have 
> > received this email in error. Shape Blue Ltd is a company 
> > incorporated in England & Wales. ShapeBlue Services India LLP is a 
> > company incorporated in India and is operated under license from 
> > Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company 
> > incorporated in Brasil and is operated under license from Shape Blue 
> > Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



--
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
I don’t fully understand what I'm doing here but here's something that
puzzles me:

[root@cs-mgmt ~]# jar tf
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-database-mysqlha-4.3.0.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/cloud/
com/cloud/utils/
com/cloud/utils/db/
com/cloud/utils/db/StaticStrategy.class
META-INF/NOTICE
META-INF/DEPENDENCIES
META-INF/LICENSE
META-INF/maven/
META-INF/maven/org.apache.cloudstack/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.xml
META-INF/maven/org.apache.cloudstack/cloud-plugin-database-mysqlha/pom.properties
[root@cs-mgmt ~]#

Surely there's the class and that path is where a lot of other
cloudstack-related jar files live so I'm guessing that is also in the
classpath.

Anyone?

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: 10 June 2014 00:05
To: 'users@cloudstack.apache.org'
Subject: RE: Examples of configuring DB HA?

Fresh 4.3 from the RPMs in the repo. Done yesterday. Had to yum install
mysql on the management server as the client binaries weren't present but
mysql-connector-java was installed as a dependency of the cloudstack rpm.
Could something else be missing on the Centos side or does this look like a
CS issue?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 10 June 2014 00:01
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

the last question is the proper one.. ;) Probably because someone forgot it.
I also hate when this kind of thing happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade from
an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar
> that contains the class isn’t already in the classpath and what's the
> best way to fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains
> the classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a
> consequence of a class not found exception. Find the jar that contains
> the classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis
> <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos
> > 6.5 – 2 x sql servers and 1 mgmt server – all running in VMware
> > Workstation, installed from 4.3 repo) but when setting the
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404
> > from tomcat and the management server log has lines in it saying
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list
> > but nothing that I can see as an answer. I’m just a lowly network
> > engineer so wouldn’t know what these errors mean but I’m guessing I
> > won’t be the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as
> > much the same. Based on what I had read about the new changes in
> > 4.3, I had assumed that the new feature allows you to configure
> > standard MySQL (clustering not required - Galera or otherwise) in a
> > multimaster replication setup and that while management servers only
> > speak with a single server at a time, failover to a backup server is
> > automatic and does not need any work on the MySQL side to promote a
> > slave to a master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply
> > having a hot standby DB that takes over automatically. This is what
> > I take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment
> > and offset values ensure that the two DBs can safely run as
> > master-master in the event that each gets written to concurrently
> > (split brain or just two mgmt servers failing over at slightly
> > different times).
> >
> > It seems that this thread is already highlighting some of the
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy
> > <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the
> > Cloud Stack does only failover configuration and the actual
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for
> > > HA or
> > is this best done before there’s any data? The answer is, we can
> > setup replication even with existing data and then start the
> > management
> servers.
> > The mysql documentation contains the clear steps how to setup
> > replication with existing documentation. Probably that is the reason
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master
> > to many slaves.
> > ACS should not fence itself like it currently does when the master
> > is not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a
> > > minimal
> > documentation in the 4.3 doc. The design doc also contains the links
> > to mysql site for setting up the replication for fresh as well as
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the
> > > DB HA
> > features introduced in 4.3? Between the section in the design docs
> > on the wiki and the official docs, I’m a little confused as to how
> > it’s supposed to be set up – they appear to differ although there’s
> > a lot more detail in the design docs. Some of it is clearly MySQL
> > stuff that’s outside of Cloudstack but some of it is Cloudstack
> > config as well. I’m just trying to get a feel for what is the best
> > way to use what’s made it into 4.3 final (if different to the design
> > docs). I’m not too strong on MySQL so I can’t easily work out what’s
> > a requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the
> > > CS side
> > purely for failover or does it actually set up part of the
> > replication for you? Can you easily enable an existing DB for HA or
> > is this best done before there’s any data? Before you run
> > cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867
> > shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India
> > | LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and
> > do not necessarily represent those of Shape Blue Ltd or related
> > companies. If you are not the intended recipient of this email, you
> > must neither take any action based upon its contents, nor copy or
> > show it to anyone. Please contact the sender if you believe you have
> > received this email in error. Shape Blue Ltd is a company
> > incorporated in England & Wales. ShapeBlue Services India LLP is a
> > company incorporated in India and is operated under license from
> > Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company
> > incorporated in Brasil and is operated under license from Shape Blue
> > Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



--
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
Fresh 4.3 from the RPMs in the repo. Done yesterday. Had to yum install
mysql on the management server as the client binaries weren't present but
mysql-connector-java was installed as a dependency of the cloudstack rpm.
Could something else be missing on the Centos side or does this look like a
CS issue?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 10 June 2014 00:01
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

the last question is the proper one.. ;) Probably because someone forgot it.
I also hate when this kind of thing happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade from
an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar
> that contains the class isn’t already in the classpath and what's the
> best way to fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains
> the classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a
> consequence of a class not found exception. Find the jar that contains
> the classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis
> <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos
> > 6.5 – 2 x sql servers and 1 mgmt server – all running in VMware
> > Workstation, installed from 4.3 repo) but when setting the
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404
> > from tomcat and the management server log has lines in it saying
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list
> > but nothing that I can see as an answer. I’m just a lowly network
> > engineer so wouldn’t know what these errors mean but I’m guessing I
> > won’t be the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as
> > much the same. Based on what I had read about the new changes in
> > 4.3, I had assumed that the new feature allows you to configure
> > standard MySQL (clustering not required - Galera or otherwise) in a
> > multimaster replication setup and that while management servers only
> > speak with a single server at a time, failover to a backup server is
> > automatic and does not need any work on the MySQL side to promote a
> > slave to a master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply
> > having a hot standby DB that takes over automatically. This is what
> > I take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment
> > and offset values ensure that the two DBs can safely run as
> > master-master in the event that each gets written to concurrently
> > (split brain or just two mgmt servers failing over at slightly
> > different times).
> >
> > It seems that this thread is already highlighting some of the
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy
> > <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the
> > Cloud Stack does only failover configuration and the actual
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for
> > > HA or
> > is this best done before there’s any data? The answer is, we can
> > setup replication even with existing data and then start the
> > management
> servers.
> > The mysql documentation contains the clear steps how to setup
> > replication with existing documentation. Probably that is the reason
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master
> > to many slaves.
> > ACS should not fence itself like it currently does when the master
> > is not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a
> > > minimal
> > documentation in the 4.3 doc. The design doc also contains the links
> > to mysql site for setting up the replication for fresh as well as
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=348
> > 38
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the
> > > DB HA
> > features introduced in 4.3? Between the section in the design docs
> > on the wiki and the official docs, I’m a little confused as to how
> > it’s supposed to be set up – they appear to differ although there’s
> > a lot more detail in the design docs. Some of it is clearly MySQL
> > stuff that’s outside of Cloudstack but some of it is Cloudstack
> > config as well. I’m just trying to get a feel for what is the best
> > way to use what’s made it into 4.3 final (if different to the design
> > docs). I’m not too strong on MySQL so I can’t easily work out what’s
> > a requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the
> > > CS side
> > purely for failover or does it actually set up part of the
> > replication for you? Can you easily enable an existing DB for HA or
> > is this best done before there’s any data? Before you run
> > cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867
> > shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India
> > | LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and
> > do not necessarily represent those of Shape Blue Ltd or related
> > companies. If you are not the intended recipient of this email, you
> > must neither take any action based upon its contents, nor copy or
> > show it to anyone. Please contact the sender if you believe you have
> > received this email in error. Shape Blue Ltd is a company
> > incorporated in England & Wales. ShapeBlue Services India LLP is a
> > company incorporated in India and is operated under license from
> > Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company
> > incorporated in Brasil and is operated under license from Shape Blue
> > Ltd. ShapeBlue is a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



--
Rafael Weingärtner

Re: Examples of configuring DB HA?

Posted by Rafael Weingartner <ra...@gmail.com>.
the last question is the proper one.. ;)
Probably because someone forgot it. I also hate when this kind of thing
happens...
How did you set up the CS version ? I mean fresh install 4.3 or upgrade
from an older version?


On Mon, Jun 9, 2014 at 7:49 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I guess my question should perhaps be, does anyone know why the jar that
> contains the class isn’t already in the classpath and what's the best way
> to
> fix it?
>
> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: 09 June 2014 23:37
> To: users@cloudstack.apache.org
> Subject: RE: Examples of configuring DB HA?
>
> I'm going to sound stupid here but how do I find the jar that contains the
> classes and what is the classpath?
>
> Is this a bug of some sort?
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
> Sent: 09 June 2014 23:28
> To: users@cloudstack.apache.org
> Subject: Re: Examples of configuring DB HA?
>
> Well, tomcat is returning 404, because the app is not running. As a
> consequence of a class not found exception. Find the jar that contains the
> classes that are missing and add them into the classpath.
>
>
> On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
> wrote:
>
> > I was very close to getting this up and running in the lab (Centos 6.5
> > – 2 x sql servers and 1 mgmt server – all running in VMware
> > Workstation, installed from 4.3 repo) but when setting the
> > db.ha.enabled to true and restarting the mgmt. server, I now get 404
> > from tomcat and the management server log has lines in it saying
> > things
> > like:
> >
> >
> >
> > 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> > Unable to get a new db connection
> >
> > java.sql.SQLException: Invalid load balancing strategy
> > 'com.cloud.utils.db.StaticStrategy'.
> >
> > […]
> >
> > Caused by: java.lang.ClassNotFoundException:
> > com.cloud.utils.db.StaticStrategy
> >
> >
> >
> > Anyone got any idea? Tried Googling and searching the mailing list but
> > nothing that I can see as an answer. I’m just a lowly network engineer
> > so wouldn’t know what these errors mean but I’m guessing I won’t be
> > the first.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > *Sent:* 06 June 2014 10:51
> > *To:* users@cloudstack.apache.org
> > *Subject:* Re: Examples of configuring DB HA?
> >
> >
> >
> > Hi all,
> >
> > Firstly thanks for the great responses already.
> >
> > Secondly, regarding HA vs failover, I had been assuming these as much
> > the same. Based on what I had read about the new changes in 4.3, I had
> > assumed that the new feature allows you to configure standard MySQL
> > (clustering not required - Galera or otherwise) in a multimaster
> > replication setup and that while management servers only speak with a
> > single server at a time, failover to a backup server is automatic and
> > does not need any work on the MySQL side to promote a slave to a
> > master as with a basic master/slave setup.
> >
> > I'm personally not interested in load balancing just yet, simply
> > having a hot standby DB that takes over automatically. This is what I
> > take the term HA to mean.
> >
> > From the wiki, I'm also taking it that the use of the auto increment
> > and offset values ensure that the two DBs can safely run as
> > master-master in the event that each gets written to concurrently
> > (split brain or just two mgmt servers failing over at slightly
> > different times).
> >
> > It seems that this thread is already highlighting some of the
> > confusion I and others have faced. Hopefully it will help someone else.
> >
> > Thanks again,
> >
> > Adrian
> >
> > On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com>
> wrote:
> >
> > Hi Damodar,
> >
> > Comments inline.
> >
> > On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com>
> > wrote:
> >
> > > Hi Adrian,
> > >
> > > For your question, . Is the CS side purely for failover or does it
> > actually set up part of the replication for you? The answer is, the
> > Cloud Stack does only failover configuration and the actual
> > replication process on the mysql side has to be done by own.
> >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838
> > 207
> >
> > > For the second question, Can you easily enable an existing DB for HA
> > > or
> > is this best done before there’s any data? The answer is, we can setup
> > replication even with existing data and then start the management
> servers.
> > The mysql documentation contains the clear steps how to setup
> > replication with existing documentation. Probably that is the reason
> > why we might not have included these steps in the doc.
> > >
> >
> >
> > The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> > using MySQL Clustering.
> >
> > Once you have MySQL Clustering, its multi-master and not one master to
> > many slaves.
> > ACS should not fence itself like it currently does when the master is
> > not available.
> >
> >
> > > The configuraiton we need to do on each management server is as below.
> > >
> > > You can follow the design doc steps if you think there is a minimal
> > documentation in the 4.3 doc. The design doc also contains the links
> > to mysql site for setting up the replication for fresh as well as
> > existing setups.
> > >
> > > From the cloud stack side it is purely failover and falling back
> > > between
> > the IPs configured for the master/salve databases.
> > >
> >
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838
> > 207
> >
> >
> >
> > > -----Original Message-----
> > > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > > Sent: Friday, June 6, 2014 6:46 AM
> > > To: users@cloudstack.apache.org
> > > Subject: Examples of configuring DB HA?
> > >
> > > Hi all,
> > >
> > >
> > >
> > > Does anyone have any example configs or blog posts explaining the DB
> > > HA
> > features introduced in 4.3? Between the section in the design docs on
> > the wiki and the official docs, I’m a little confused as to how it’s
> > supposed to be set up – they appear to differ although there’s a lot
> > more detail in the design docs. Some of it is clearly MySQL stuff
> > that’s outside of Cloudstack but some of it is Cloudstack config as
> > well. I’m just trying to get a feel for what is the best way to use
> > what’s made it into 4.3 final (if different to the design docs). I’m
> > not too strong on MySQL so I can’t easily work out what’s a
> > requirement, what’s just recommended (and
> > > implications) and what the Cloudstack side actually does. Is the CS
> > > side
> > purely for failover or does it actually set up part of the replication
> > for you? Can you easily enable an existing DB for HA or is this best
> > done before there’s any data? Before you run cloudstack-setup-databases?
> > >
> > >
> > >
> > > Shanker – I don’t suppose this subject could add to your already
> > excellent blog post collection?
> > >
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > >
> > > Adrian
> >
> > --
> > @shankerbalan
> >
> > M: +91 98860 60539 | O: +91 (80) 67935867 shanker.balan@shapeblue.com
> > | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India LLP,
> > 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> > services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//
> > <http://shapeblue.com/iaas-cloud-design-and-build/>>
> > CSForge – rapid IaaS deployment
> > framework<http://shapeblue.com/csforge/>
> > CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are
> > intended solely for the use of the individual to whom it is addressed.
> > Any views or opinions expressed are solely those of the author and do
> > not necessarily represent those of Shape Blue Ltd or related
> > companies. If you are not the intended recipient of this email, you
> > must neither take any action based upon its contents, nor copy or show
> > it to anyone. Please contact the sender if you believe you have
> > received this email in error. Shape Blue Ltd is a company incorporated
> > in England & Wales. ShapeBlue Services India LLP is a company
> > incorporated in India and is operated under license from Shape Blue
> > Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> > Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is
> > a registered trademark.
> >
>
>
>
> --
> Rafael Weingärtner
>



-- 
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
I guess my question should perhaps be, does anyone know why the jar that
contains the class isn’t already in the classpath and what's the best way to
fix it?

-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
Sent: 09 June 2014 23:37
To: users@cloudstack.apache.org
Subject: RE: Examples of configuring DB HA?

I'm going to sound stupid here but how do I find the jar that contains the
classes and what is the classpath?

Is this a bug of some sort?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 09 June 2014 23:28
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

Well, tomcat is returning 404, because the app is not running. As a
consequence of a class not found exception. Find the jar that contains the
classes that are missing and add them into the classpath.


On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I was very close to getting this up and running in the lab (Centos 6.5
> – 2 x sql servers and 1 mgmt server – all running in VMware
> Workstation, installed from 4.3 repo) but when setting the
> db.ha.enabled to true and restarting the mgmt. server, I now get 404
> from tomcat and the management server log has lines in it saying
> things
> like:
>
>
>
> 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> Unable to get a new db connection
>
> java.sql.SQLException: Invalid load balancing strategy
> 'com.cloud.utils.db.StaticStrategy'.
>
> […]
>
> Caused by: java.lang.ClassNotFoundException:
> com.cloud.utils.db.StaticStrategy
>
>
>
> Anyone got any idea? Tried Googling and searching the mailing list but
> nothing that I can see as an answer. I’m just a lowly network engineer
> so wouldn’t know what these errors mean but I’m guessing I won’t be
> the first.
>
>
>
> Any ideas?
>
>
>
> *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> *Sent:* 06 June 2014 10:51
> *To:* users@cloudstack.apache.org
> *Subject:* Re: Examples of configuring DB HA?
>
>
>
> Hi all,
>
> Firstly thanks for the great responses already.
>
> Secondly, regarding HA vs failover, I had been assuming these as much
> the same. Based on what I had read about the new changes in 4.3, I had
> assumed that the new feature allows you to configure standard MySQL
> (clustering not required - Galera or otherwise) in a multimaster
> replication setup and that while management servers only speak with a
> single server at a time, failover to a backup server is automatic and
> does not need any work on the MySQL side to promote a slave to a
> master as with a basic master/slave setup.
>
> I'm personally not interested in load balancing just yet, simply
> having a hot standby DB that takes over automatically. This is what I
> take the term HA to mean.
>
> From the wiki, I'm also taking it that the use of the auto increment
> and offset values ensure that the two DBs can safely run as
> master-master in the event that each gets written to concurrently
> (split brain or just two mgmt servers failing over at slightly
> different times).
>
> It seems that this thread is already highlighting some of the
> confusion I and others have faced. Hopefully it will help someone else.
>
> Thanks again,
>
> Adrian
>
> On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com> wrote:
>
> Hi Damodar,
>
> Comments inline.
>
> On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com>
> wrote:
>
> > Hi Adrian,
> >
> > For your question, . Is the CS side purely for failover or does it
> actually set up part of the replication for you? The answer is, the
> Cloud Stack does only failover configuration and the actual
> replication process on the mysql side has to be done by own.
>
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838
> 207
>
> > For the second question, Can you easily enable an existing DB for HA
> > or
> is this best done before there’s any data? The answer is, we can setup
> replication even with existing data and then start the management servers.
> The mysql documentation contains the clear steps how to setup
> replication with existing documentation. Probably that is the reason
> why we might not have included these steps in the doc.
> >
>
>
> The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> using MySQL Clustering.
>
> Once you have MySQL Clustering, its multi-master and not one master to
> many slaves.
> ACS should not fence itself like it currently does when the master is
> not available.
>
>
> > The configuraiton we need to do on each management server is as below.
> >
> > You can follow the design doc steps if you think there is a minimal
> documentation in the 4.3 doc. The design doc also contains the links
> to mysql site for setting up the replication for fresh as well as
> existing setups.
> >
> > From the cloud stack side it is purely failover and falling back
> > between
> the IPs configured for the master/salve databases.
> >
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838
> 207
>
>
>
> > -----Original Message-----
> > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > Sent: Friday, June 6, 2014 6:46 AM
> > To: users@cloudstack.apache.org
> > Subject: Examples of configuring DB HA?
> >
> > Hi all,
> >
> >
> >
> > Does anyone have any example configs or blog posts explaining the DB
> > HA
> features introduced in 4.3? Between the section in the design docs on
> the wiki and the official docs, I’m a little confused as to how it’s
> supposed to be set up – they appear to differ although there’s a lot
> more detail in the design docs. Some of it is clearly MySQL stuff
> that’s outside of Cloudstack but some of it is Cloudstack config as
> well. I’m just trying to get a feel for what is the best way to use
> what’s made it into 4.3 final (if different to the design docs). I’m
> not too strong on MySQL so I can’t easily work out what’s a
> requirement, what’s just recommended (and
> > implications) and what the Cloudstack side actually does. Is the CS
> > side
> purely for failover or does it actually set up part of the replication
> for you? Can you easily enable an existing DB for HA or is this best
> done before there’s any data? Before you run cloudstack-setup-databases?
> >
> >
> >
> > Shanker – I don’t suppose this subject could add to your already
> excellent blog post collection?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > Adrian
>
> --
> @shankerbalan
>
> M: +91 98860 60539 | O: +91 (80) 67935867 shanker.balan@shapeblue.com
> | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India LLP,
> 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
>
> Find out more about ShapeBlue and our range of CloudStack related
> services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//
> <http://shapeblue.com/iaas-cloud-design-and-build/>>
> CSForge – rapid IaaS deployment
> framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are
> intended solely for the use of the individual to whom it is addressed.
> Any views or opinions expressed are solely those of the author and do
> not necessarily represent those of Shape Blue Ltd or related
> companies. If you are not the intended recipient of this email, you
> must neither take any action based upon its contents, nor copy or show
> it to anyone. Please contact the sender if you believe you have
> received this email in error. Shape Blue Ltd is a company incorporated
> in England & Wales. ShapeBlue Services India LLP is a company
> incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is
> a registered trademark.
>



--
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
I'm going to sound stupid here but how do I find the jar that contains the
classes and what is the classpath?

Is this a bug of some sort?

-----Original Message-----
From: Rafael Weingartner [mailto:rafaelweingartner@gmail.com]
Sent: 09 June 2014 23:28
To: users@cloudstack.apache.org
Subject: Re: Examples of configuring DB HA?

Well, tomcat is returning 404, because the app is not running. As a
consequence of a class not found exception. Find the jar that contains the
classes that are missing and add them into the classpath.


On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I was very close to getting this up and running in the lab (Centos 6.5
> – 2 x sql servers and 1 mgmt server – all running in VMware
> Workstation, installed from 4.3 repo) but when setting the
> db.ha.enabled to true and restarting the mgmt. server, I now get 404
> from tomcat and the management server log has lines in it saying things
> like:
>
>
>
> 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null)
> Unable to get a new db connection
>
> java.sql.SQLException: Invalid load balancing strategy
> 'com.cloud.utils.db.StaticStrategy'.
>
> […]
>
> Caused by: java.lang.ClassNotFoundException:
> com.cloud.utils.db.StaticStrategy
>
>
>
> Anyone got any idea? Tried Googling and searching the mailing list but
> nothing that I can see as an answer. I’m just a lowly network engineer
> so wouldn’t know what these errors mean but I’m guessing I won’t be the
> first.
>
>
>
> Any ideas?
>
>
>
> *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> *Sent:* 06 June 2014 10:51
> *To:* users@cloudstack.apache.org
> *Subject:* Re: Examples of configuring DB HA?
>
>
>
> Hi all,
>
> Firstly thanks for the great responses already.
>
> Secondly, regarding HA vs failover, I had been assuming these as much
> the same. Based on what I had read about the new changes in 4.3, I had
> assumed that the new feature allows you to configure standard MySQL
> (clustering not required - Galera or otherwise) in a multimaster
> replication setup and that while management servers only speak with a
> single server at a time, failover to a backup server is automatic and
> does not need any work on the MySQL side to promote a slave to a
> master as with a basic master/slave setup.
>
> I'm personally not interested in load balancing just yet, simply
> having a hot standby DB that takes over automatically. This is what I
> take the term HA to mean.
>
> From the wiki, I'm also taking it that the use of the auto increment
> and offset values ensure that the two DBs can safely run as
> master-master in the event that each gets written to concurrently
> (split brain or just two mgmt servers failing over at slightly different
> times).
>
> It seems that this thread is already highlighting some of the
> confusion I and others have faced. Hopefully it will help someone else.
>
> Thanks again,
>
> Adrian
>
> On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com> wrote:
>
> Hi Damodar,
>
> Comments inline.
>
> On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com>
> wrote:
>
> > Hi Adrian,
> >
> > For your question, . Is the CS side purely for failover or does it
> actually set up part of the replication for you? The answer is, the
> Cloud Stack does only failover configuration and the actual
> replication process on the mysql side has to be done by own.
>
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838
> 207
>
> > For the second question, Can you easily enable an existing DB for HA
> > or
> is this best done before there’s any data? The answer is, we can setup
> replication even with existing data and then start the management servers.
> The mysql documentation contains the clear steps how to setup
> replication with existing documentation. Probably that is the reason
> why we might not have included these steps in the doc.
> >
>
>
> The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> using MySQL Clustering.
>
> Once you have MySQL Clustering, its multi-master and not one master to
> many slaves.
> ACS should not fence itself like it currently does when the master is
> not available.
>
>
> > The configuraiton we need to do on each management server is as below.
> >
> > You can follow the design doc steps if you think there is a minimal
> documentation in the 4.3 doc. The design doc also contains the links
> to mysql site for setting up the replication for fresh as well as
> existing setups.
> >
> > From the cloud stack side it is purely failover and falling back
> > between
> the IPs configured for the master/salve databases.
> >
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838
> 207
>
>
>
> > -----Original Message-----
> > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > Sent: Friday, June 6, 2014 6:46 AM
> > To: users@cloudstack.apache.org
> > Subject: Examples of configuring DB HA?
> >
> > Hi all,
> >
> >
> >
> > Does anyone have any example configs or blog posts explaining the DB
> > HA
> features introduced in 4.3? Between the section in the design docs on
> the wiki and the official docs, I’m a little confused as to how it’s
> supposed to be set up – they appear to differ although there’s a lot
> more detail in the design docs. Some of it is clearly MySQL stuff
> that’s outside of Cloudstack but some of it is Cloudstack config as
> well. I’m just trying to get a feel for what is the best way to use
> what’s made it into 4.3 final (if different to the design docs). I’m
> not too strong on MySQL so I can’t easily work out what’s a
> requirement, what’s just recommended (and
> > implications) and what the Cloudstack side actually does. Is the CS
> > side
> purely for failover or does it actually set up part of the replication
> for you? Can you easily enable an existing DB for HA or is this best
> done before there’s any data? Before you run cloudstack-setup-databases?
> >
> >
> >
> > Shanker – I don’t suppose this subject could add to your already
> excellent blog post collection?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > Adrian
>
> --
> @shankerbalan
>
> M: +91 98860 60539 | O: +91 (80) 67935867 shanker.balan@shapeblue.com
> | www.shapeblue.com | Twitter:@shapeblue ShapeBlue Services India LLP,
> 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055
>
> Find out more about ShapeBlue and our range of CloudStack related
> services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//
> <http://shapeblue.com/iaas-cloud-design-and-build/>>
> CSForge – rapid IaaS deployment
> framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are
> intended solely for the use of the individual to whom it is addressed.
> Any views or opinions expressed are solely those of the author and do
> not necessarily represent those of Shape Blue Ltd or related
> companies. If you are not the intended recipient of this email, you
> must neither take any action based upon its contents, nor copy or show
> it to anyone. Please contact the sender if you believe you have
> received this email in error. Shape Blue Ltd is a company incorporated
> in England & Wales. ShapeBlue Services India LLP is a company
> incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
>



--
Rafael Weingärtner

Re: Examples of configuring DB HA?

Posted by Rafael Weingartner <ra...@gmail.com>.
Well, tomcat is returning 404, because the app is not running. As a
consequence of a class not found exception. Find the jar that contains the
classes that are missing and add them into the classpath.


On Mon, Jun 9, 2014 at 7:18 PM, Adrian Lewis <ad...@alsiconsulting.co.uk>
wrote:

> I was very close to getting this up and running in the lab (Centos 6.5 – 2
> x sql servers and 1 mgmt server – all running in VMware Workstation,
> installed from 4.3 repo) but when setting the db.ha.enabled to true and
> restarting the mgmt. server, I now get 404 from tomcat and the management
> server log has lines in it saying things like:
>
>
>
> 2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null) Unable to
> get a new db connection
>
> java.sql.SQLException: Invalid load balancing strategy
> 'com.cloud.utils.db.StaticStrategy'.
>
> […]
>
> Caused by: java.lang.ClassNotFoundException:
> com.cloud.utils.db.StaticStrategy
>
>
>
> Anyone got any idea? Tried Googling and searching the mailing list but
> nothing that I can see as an answer. I’m just a lowly network engineer so
> wouldn’t know what these errors mean but I’m guessing I won’t be the first.
>
>
>
> Any ideas?
>
>
>
> *From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> *Sent:* 06 June 2014 10:51
> *To:* users@cloudstack.apache.org
> *Subject:* Re: Examples of configuring DB HA?
>
>
>
> Hi all,
>
> Firstly thanks for the great responses already.
>
> Secondly, regarding HA vs failover, I had been assuming these as much the
> same. Based on what I had read about the new changes in 4.3, I had assumed
> that the new feature allows you to configure standard MySQL (clustering not
> required - Galera or otherwise) in a multimaster replication setup and that
> while management servers only speak with a single server at a time,
> failover to a backup server is automatic and does not need any work on the
> MySQL side to promote a slave to a master as with a basic master/slave
> setup.
>
> I'm personally not interested in load balancing just yet, simply having a
> hot standby DB that takes over automatically. This is what I take the term
> HA to mean.
>
> From the wiki, I'm also taking it that the use of the auto increment and
> offset values ensure that the two DBs can safely run as master-master in
> the event that each gets written to concurrently (split brain or just two
> mgmt servers failing over at slightly different times).
>
> It seems that this thread is already highlighting some of the confusion I
> and others have faced. Hopefully it will help someone else.
>
> Thanks again,
>
> Adrian
>
> On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com> wrote:
>
> Hi Damodar,
>
> Comments inline.
>
> On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com>
> wrote:
>
> > Hi Adrian,
> >
> > For your question, . Is the CS side purely for failover or does it
> actually set up part of the replication for you? The answer is, the Cloud
> Stack does only failover configuration and the actual replication process
> on the mysql side has to be done by own.
>
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207
>
> > For the second question, Can you easily enable an existing DB for HA or
> is this best done before there’s any data? The answer is, we can setup
> replication even with existing data and then start the management servers.
> The mysql documentation contains the clear steps how to setup replication
> with existing documentation. Probably that is the reason why we might not
> have included these steps in the doc.
> >
>
>
> The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> using MySQL Clustering.
>
> Once you have MySQL Clustering, its multi-master and not one master to many
> slaves.
> ACS should not fence itself like it currently does when the master is not
> available.
>
>
> > The configuraiton we need to do on each management server is as below.
> >
> > You can follow the design doc steps if you think there is a minimal
> documentation in the 4.3 doc. The design doc also contains the links to
> mysql site for setting up the replication for fresh as well as existing
> setups.
> >
> > From the cloud stack side it is purely failover and falling back between
> the IPs configured for the master/salve databases.
> >
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207
>
>
>
> > -----Original Message-----
> > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > Sent: Friday, June 6, 2014 6:46 AM
> > To: users@cloudstack.apache.org
> > Subject: Examples of configuring DB HA?
> >
> > Hi all,
> >
> >
> >
> > Does anyone have any example configs or blog posts explaining the DB HA
> features introduced in 4.3? Between the section in the design docs on the
> wiki and the official docs, I’m a little confused as to how it’s supposed
> to be set up – they appear to differ although there’s a lot more detail in
> the design docs. Some of it is clearly MySQL stuff that’s outside of
> Cloudstack but some of it is Cloudstack config as well. I’m just trying to
> get a feel for what is the best way to use what’s made it into 4.3 final
> (if different to the design docs). I’m not too strong on MySQL so I can’t
> easily work out what’s a requirement, what’s just recommended (and
> > implications) and what the Cloudstack side actually does. Is the CS side
> purely for failover or does it actually set up part of the replication for
> you? Can you easily enable an existing DB for HA or is this best done
> before there’s any data? Before you run cloudstack-setup-databases?
> >
> >
> >
> > Shanker – I don’t suppose this subject could add to your already
> excellent blog post collection?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > Adrian
>
> --
> @shankerbalan
>
> M: +91 98860 60539 | O: +91 (80) 67935867
> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre,
> Bangalore - 560 055
>
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//
> <http://shapeblue.com/iaas-cloud-design-and-build/>>
> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
>



-- 
Rafael Weingärtner

RE: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
I was very close to getting this up and running in the lab (Centos 6.5 – 2
x sql servers and 1 mgmt server – all running in VMware Workstation,
installed from 4.3 repo) but when setting the db.ha.enabled to true and
restarting the mgmt. server, I now get 404 from tomcat and the management
server log has lines in it saying things like:



2014-06-09 22:48:00,632 ERROR [c.c.u.d.Merovingian2] (main:null) Unable to
get a new db connection

java.sql.SQLException: Invalid load balancing strategy
'com.cloud.utils.db.StaticStrategy'.

[…]

Caused by: java.lang.ClassNotFoundException:
com.cloud.utils.db.StaticStrategy



Anyone got any idea? Tried Googling and searching the mailing list but
nothing that I can see as an answer. I’m just a lowly network engineer so
wouldn’t know what these errors mean but I’m guessing I won’t be the first.



Any ideas?



*From:* Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
*Sent:* 06 June 2014 10:51
*To:* users@cloudstack.apache.org
*Subject:* Re: Examples of configuring DB HA?



Hi all,

Firstly thanks for the great responses already.

Secondly, regarding HA vs failover, I had been assuming these as much the
same. Based on what I had read about the new changes in 4.3, I had assumed
that the new feature allows you to configure standard MySQL (clustering not
required - Galera or otherwise) in a multimaster replication setup and that
while management servers only speak with a single server at a time,
failover to a backup server is automatic and does not need any work on the
MySQL side to promote a slave to a master as with a basic master/slave
setup.

I'm personally not interested in load balancing just yet, simply having a
hot standby DB that takes over automatically. This is what I take the term
HA to mean.

>From the wiki, I'm also taking it that the use of the auto increment and
offset values ensure that the two DBs can safely run as master-master in
the event that each gets written to concurrently (split brain or just two
mgmt servers failing over at slightly different times).

It seems that this thread is already highlighting some of the confusion I
and others have faced. Hopefully it will help someone else.

Thanks again,

Adrian

On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com> wrote:

Hi Damodar,

Comments inline.

On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com> wrote:

> Hi Adrian,
>
> For your question, . Is the CS side purely for failover or does it
actually set up part of the replication for you? The answer is, the Cloud
Stack does only failover configuration and the actual replication process
on the mysql side has to be done by own.


https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207

> For the second question, Can you easily enable an existing DB for HA or
is this best done before there’s any data? The answer is, we can setup
replication even with existing data and then start the management servers.
The mysql documentation contains the clear steps how to setup replication
with existing documentation. Probably that is the reason why we might not
have included these steps in the doc.
>


The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
using MySQL Clustering.

Once you have MySQL Clustering, its multi-master and not one master to many
slaves.
ACS should not fence itself like it currently does when the master is not
available.


> The configuraiton we need to do on each management server is as below.
>
> You can follow the design doc steps if you think there is a minimal
documentation in the 4.3 doc. The design doc also contains the links to
mysql site for setting up the replication for fresh as well as existing
setups.
>
> From the cloud stack side it is purely failover and falling back between
the IPs configured for the master/salve databases.
>

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207



> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: Friday, June 6, 2014 6:46 AM
> To: users@cloudstack.apache.org
> Subject: Examples of configuring DB HA?
>
> Hi all,
>
>
>
> Does anyone have any example configs or blog posts explaining the DB HA
features introduced in 4.3? Between the section in the design docs on the
wiki and the official docs, I’m a little confused as to how it’s supposed
to be set up – they appear to differ although there’s a lot more detail in
the design docs. Some of it is clearly MySQL stuff that’s outside of
Cloudstack but some of it is Cloudstack config as well. I’m just trying to
get a feel for what is the best way to use what’s made it into 4.3 final
(if different to the design docs). I’m not too strong on MySQL so I can’t
easily work out what’s a requirement, what’s just recommended (and
> implications) and what the Cloudstack side actually does. Is the CS side
purely for failover or does it actually set up part of the replication for
you? Can you easily enable an existing DB for HA or is this best done
before there’s any data? Before you run cloudstack-setup-databases?
>
>
>
> Shanker – I don’t suppose this subject could add to your already
excellent blog post collection?
>
>
>
> Thanks in advance,
>
>
>
> Adrian

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre,
Bangalore - 560 055

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//
<http://shapeblue.com/iaas-cloud-design-and-build/>>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<
http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<
http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended
solely for the use of the individual to whom it is addressed. Any views or
opinions expressed are solely those of the author and do not necessarily
represent those of Shape Blue Ltd or related companies. If you are not the
intended recipient of this email, you must neither take any action based
upon its contents, nor copy or show it to anyone. Please contact the sender
if you believe you have received this email in error. Shape Blue Ltd is a
company incorporated in England & Wales. ShapeBlue Services India LLP is a
company incorporated in India and is operated under license from Shape Blue
Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
and is operated under license from Shape Blue Ltd. ShapeBlue is a
registered trademark.

Re: Examples of configuring DB HA?

Posted by Adrian Lewis <ad...@alsiconsulting.co.uk>.
Hi all,

Firstly thanks for the great responses already.

Secondly, regarding HA vs failover, I had been assuming these as much the
same. Based on what I had read about the new changes in 4.3, I had assumed
that the new feature allows you to configure standard MySQL (clustering not
required - Galera or otherwise) in a multimaster replication setup and that
while management servers only speak with a single server at a time,
failover to a backup server is automatic and does not need any work on the
MySQL side to promote a slave to a master as with a basic master/slave
setup.

I'm personally not interested in load balancing just yet, simply having a
hot standby DB that takes over automatically. This is what I take the term
HA to mean.

>From the wiki, I'm also taking it that the use of the auto increment and
offset values ensure that the two DBs can safely run as master-master in
the event that each gets written to concurrently (split brain or just two
mgmt servers failing over at slightly different times).

It seems that this thread is already highlighting some of the confusion I
and others have faced. Hopefully it will help someone else.

Thanks again,

Adrian
On 6 Jun 2014 07:18, "Shanker Balan" <sh...@shapeblue.com> wrote:

> Hi Damodar,
>
> Comments inline.
>
> On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com>
> wrote:
>
> > Hi Adrian,
> >
> > For your question, . Is the CS side purely for failover or does it
> actually set up part of the replication for you? The answer is, the Cloud
> Stack does only failover configuration and the actual replication process
> on the mysql side has to be done by own.
>
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207
>
> > For the second question, Can you easily enable an existing DB for HA or
> is this best done before there’s any data? The answer is, we can setup
> replication even with existing data and then start the management servers.
> The mysql documentation contains the clear steps how to setup replication
> with existing documentation. Probably that is the reason why we might not
> have included these steps in the doc.
> >
>
>
> The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
> using MySQL Clustering.
>
> Once you have MySQL Clustering, its multi-master and not one master to
> many slaves.
> ACS should not fence itself like it currently does when the master is not
> available.
>
>
> > The configuraiton we need to do on each management server is as below.
> >
> > You can follow the design doc steps if you think there is a minimal
> documentation in the 4.3 doc. The design doc also contains the links to
> mysql site for setting up the replication for fresh as well as existing
> setups.
> >
> > From the cloud stack side it is purely failover and falling back between
> the IPs configured for the master/salve databases.
> >
>
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207
>
>
>
> > -----Original Message-----
> > From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> > Sent: Friday, June 6, 2014 6:46 AM
> > To: users@cloudstack.apache.org
> > Subject: Examples of configuring DB HA?
> >
> > Hi all,
> >
> >
> >
> > Does anyone have any example configs or blog posts explaining the DB HA
> features introduced in 4.3? Between the section in the design docs on the
> wiki and the official docs, I’m a little confused as to how it’s supposed
> to be set up – they appear to differ although there’s a lot more detail in
> the design docs. Some of it is clearly MySQL stuff that’s outside of
> Cloudstack but some of it is Cloudstack config as well. I’m just trying to
> get a feel for what is the best way to use what’s made it into 4.3 final
> (if different to the design docs). I’m not too strong on MySQL so I can’t
> easily work out what’s a requirement, what’s just recommended (and
> > implications) and what the Cloudstack side actually does. Is the CS side
> purely for failover or does it actually set up part of the replication for
> you? Can you easily enable an existing DB for HA or is this best done
> before there’s any data? Before you run cloudstack-setup-databases?
> >
> >
> >
> > Shanker – I don’t suppose this subject could add to your already
> excellent blog post collection?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > Adrian
>
> --
> @shankerbalan
>
> M: +91 98860 60539 | O: +91 (80) 67935867
> shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
> ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre,
> Bangalore - 560 055
>
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue is a
> registered trademark.
>

Re: Examples of configuring DB HA?

Posted by Shanker Balan <sh...@shapeblue.com>.
Hi Damodar,

Comments inline.

On 06-Jun-2014, at 10:53 am, Damoder Reddy <Da...@citrix.com> wrote:

> Hi Adrian,
>
> For your question, . Is the CS side purely for failover or does it actually set up part of the replication for you? The answer is, the Cloud Stack does only failover configuration and the actual replication process on the mysql side has to be done by own.


https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207

> For the second question, Can you easily enable an existing DB for HA or is this best done before there’s any data? The answer is, we can setup replication even with existing data and then start the management servers. The mysql documentation contains the clear steps how to setup replication with existing documentation. Probably that is the reason why we might not have included these steps in the doc.
>


The OP is looking for HA, not failover. HA is possible in ACS 4.3.0
using MySQL Clustering.

Once you have MySQL Clustering, its multi-master and not one master to many slaves.
ACS should not fence itself like it currently does when the master is not available.


> The configuraiton we need to do on each management server is as below.
>
> You can follow the design doc steps if you think there is a minimal documentation in the 4.3 doc. The design doc also contains the links to mysql site for setting up the replication for fresh as well as existing setups.
>
> From the cloud stack side it is purely failover and falling back between the IPs configured for the master/salve databases.
>

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207



> -----Original Message-----
> From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk]
> Sent: Friday, June 6, 2014 6:46 AM
> To: users@cloudstack.apache.org
> Subject: Examples of configuring DB HA?
>
> Hi all,
>
>
>
> Does anyone have any example configs or blog posts explaining the DB HA features introduced in 4.3? Between the section in the design docs on the wiki and the official docs, I’m a little confused as to how it’s supposed to be set up – they appear to differ although there’s a lot more detail in the design docs. Some of it is clearly MySQL stuff that’s outside of Cloudstack but some of it is Cloudstack config as well. I’m just trying to get a feel for what is the best way to use what’s made it into 4.3 final (if different to the design docs). I’m not too strong on MySQL so I can’t easily work out what’s a requirement, what’s just recommended (and
> implications) and what the Cloudstack side actually does. Is the CS side purely for failover or does it actually set up part of the replication for you? Can you easily enable an existing DB for HA or is this best done before there’s any data? Before you run cloudstack-setup-databases?
>
>
>
> Shanker – I don’t suppose this subject could add to your already excellent blog post collection?
>
>
>
> Thanks in advance,
>
>
>
> Adrian

--
@shankerbalan

M: +91 98860 60539 | O: +91 (80) 67935867
shanker.balan@shapeblue.com | www.shapeblue.com | Twitter:@shapeblue
ShapeBlue Services India LLP, 22nd floor, Unit 2201A, World Trade Centre, Bangalore - 560 055

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

RE: Examples of configuring DB HA?

Posted by Damoder Reddy <Da...@citrix.com>.
Hi Adrian,

	For your question, . Is the CS side purely for failover or does it actually set up part of the replication for you? The answer is, the Cloud Stack does only failover configuration and the actual replication process on the mysql side has to be done by own. 

For the second question, Can you easily enable an existing DB for HA or is this best done before there’s any data? The answer is, we can setup replication even with existing data and then start the management servers. The mysql documentation contains the clear steps how to setup replication with existing documentation. Probably that is the reason why we might not have included these steps in the doc.

The configuraiton we need to do on each management server is as below.

You can follow the design doc steps if you think there is a minimal documentation in the 4.3 doc. The design doc also contains the links to mysql site for setting up the replication for fresh as well as existing setups.

From the cloud stack side it is purely failover and falling back between the IPs configured for the master/salve databases.


Thanks & Regards
Damodar/


-----Original Message-----
From: Adrian Lewis [mailto:adrian@alsiconsulting.co.uk] 
Sent: Friday, June 6, 2014 6:46 AM
To: users@cloudstack.apache.org
Subject: Examples of configuring DB HA?

Hi all,



Does anyone have any example configs or blog posts explaining the DB HA features introduced in 4.3? Between the section in the design docs on the wiki and the official docs, I’m a little confused as to how it’s supposed to be set up – they appear to differ although there’s a lot more detail in the design docs. Some of it is clearly MySQL stuff that’s outside of Cloudstack but some of it is Cloudstack config as well. I’m just trying to get a feel for what is the best way to use what’s made it into 4.3 final (if different to the design docs). I’m not too strong on MySQL so I can’t easily work out what’s a requirement, what’s just recommended (and
implications) and what the Cloudstack side actually does. Is the CS side purely for failover or does it actually set up part of the replication for you? Can you easily enable an existing DB for HA or is this best done before there’s any data? Before you run cloudstack-setup-databases?



Shanker – I don’t suppose this subject could add to your already excellent blog post collection?



Thanks in advance,



Adrian