From e8e9bbccfb98abf39e5af20aea9bd29286eadc1b Mon Sep 17 00:00:00 2001 From: Alex Huang Date: Wed, 27 Apr 2011 14:07:18 -0700 Subject: [PATCH] fixes a bug where management server has conflicts causes problems --- server/src/com/cloud/cluster/ClusterManagerImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/cluster/ClusterManagerImpl.java b/server/src/com/cloud/cluster/ClusterManagerImpl.java index 3c475b318af..7b78ae897a4 100644 --- a/server/src/com/cloud/cluster/ClusterManagerImpl.java +++ b/server/src/com/cloud/cluster/ClusterManagerImpl.java @@ -689,8 +689,15 @@ public class ClusterManagerImpl implements ClusterManager { s_logger.info("Starting cluster manager, msid : " + _msid); } + try { + checkConflicts(); + } catch (ConfigurationException e1) { + throw new CloudRuntimeException("Conflicts in management server configurations detected", e1); + } + Transaction txn = Transaction.currentTxn(); try { + txn.start(); final Class c = this.getClass(); @@ -847,8 +854,6 @@ public class ClusterManagerImpl implements ClusterManager { throw new ConfigurationException("Unable to set current cluster service adapter"); } - checkConflicts(); - if(s_logger.isInfoEnabled()) { s_logger.info("Cluster manager is configured."); }