Github user kiwiflyer commented on the pull request:
https://github.com/apache/cloudstack/pull/1428#issuecomment-192309041
I've manually tested this on 4.7.1 and also on master.
Prior to the patch, the following exception was thrown:
016-03-03 12:00:13,204 INFO [c.c.u.d.T.Transaction]
(localhost-startStop-1:null) (logid:) Is Data Base High Availiability enabled?
Ans : true
2016-03-03 12:00:13,239 INFO [c.c.u.d.T.Transaction]
(localhost-startStop-1:null) (logid:) The slaves configured for Cloud Data base
is/are : localhost,localhost
2016-03-03 12:00:13,303 ERROR [c.c.u.d.Merovingian2]
(localhost-startStop-1:null) (logid:) Unable to get a new db connection
java.sql.SQLException: Invalid load balancing strategy
'com.cloud.utils.db.StaticStrategy'.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
at com.mysql.jdbc.Util.loadExtensions(Util.java:602)
at
com.mysql.jdbc.LoadBalancingConnectionProxy.<init>(LoadBalancingConnectionProxy.java:280)
at
com.mysql.jdbc.FailoverConnectionProxy.<init>(FailoverConnectionProxy.java:67)
at
com.mysql.jdbc.NonRegisteringDriver.connectFailover(NonRegisteringDriver.java:433)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at
org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at
com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:202)
at com.cloud.utils.db.Merovingian2.<init>(Merovingian2.java:68)
at
com.cloud.utils.db.Merovingian2.createLockMaster(Merovingian2.java:88)
at
com.cloud.server.LockMasterListener.<init>(LockMasterListener.java:33)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
After the patch, the following is observed in the logs
016-03-03 14:53:38,437 INFO [c.c.u.d.T.Transaction]
(localhost-startStop-1:null) (logid:) Is Data Base High Availiability enabled?
Ans : true
2016-03-03 14:53:38,587 INFO [c.c.u.d.T.Transaction]
(localhost-startStop-1:null) (logid:) The slaves configured for Cloud Data base
is/are : localhost,localhost
2016-03-03 14:53:39,332 DEBUG [c.c.u.d.ConnectionConcierge]
(localhost-startStop-1:null) (logid:) Registering a database connection for
LockMaster1
2016-03-03 14:53:39,333 INFO [c.c.u.d.Merovingian2]
(localhost-startStop-1:null) (logid:) Cleaning up locks for 2484520639032
2016-03-03 14:53:39,360 INFO [c.c.u.d.Merovingian2]
(localhost-startStop-1:null) (logid:) Released 0 locks for 2484520639032
2016-03-03 14:53:39,447 INFO [o.a.c.s.l.CloudStackExtendedLifeCycle]
(localhost-startStop-1:null) (logid:) Running system integrity checker
com.cloud.upgrade.DatabaseUpgradeChecker@71323382
2016-03-03 14:53:39,447 INFO [c.c.u.DatabaseUpgradeChecker]
(localhost-startStop-1:null) (logid:) Grabbing lock to check for database
upgrade.
2016-03-03 14:53:39,634 DEBUG [c.c.u.d.VersionDaoImpl]
(localhost-startStop-1:null) (logid:) Checking to see if the database is at a
version before it was the version table is created
2016-03-03 14:53:39,692 INFO [c.c.u.DatabaseUpgradeChecker]
(localhost-startStop-1:null) (logid:) DB version = 4.9.0 Code Version =
4.9.0-SNAPSHOT
2016-03-03 14:53:39,693 INFO [c.c.u.DatabaseUpgradeChecker]
(localhost-startStop-1:null) (logid:) DB version and code version matches so no
upgrade needed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---