You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/11/10 10:34:11 UTC
git commit: updated refs/heads/4.5 to de3eb88
Repository: cloudstack
Updated Branches:
refs/heads/4.5 1cc733bfd -> de3eb88b3
Normalize some error message strings to make maintenance (i.e., changing said error messages) a bit easier.
Signed-off-by: Rajani Karuturi <ra...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/de3eb88b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/de3eb88b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/de3eb88b
Branch: refs/heads/4.5
Commit: de3eb88b33eabc98568c353df4f5ee9e3233239c
Parents: 1cc733b
Author: Derrick Schneider <de...@opower.com>
Authored: Wed Nov 5 16:37:29 2014 -0800
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Mon Nov 10 15:00:28 2014 +0530
----------------------------------------------------------------------
.../cloud/upgrade/DatabaseUpgradeChecker.java | 30 +++++++++++---------
1 file changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/de3eb88b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
index 34d3bdf..fcc5c37 100755
--- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -276,10 +276,10 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
}
if (Version.compare(trimmedCurrentVersion, upgrades[upgrades.length - 1].getUpgradedVersion()) != 0) {
- s_logger.error("The end upgrade version is actually at " + upgrades[upgrades.length - 1].getUpgradedVersion() +
- " but our management server code version is at " + currentVersion);
- throw new CloudRuntimeException("The end upgrade version is actually at " + upgrades[upgrades.length - 1].getUpgradedVersion() +
- " but our management server code version is at " + currentVersion);
+ String errorMessage = "The end upgrade version is actually at " + upgrades[upgrades.length - 1].getUpgradedVersion() +
+ " but our management server code version is at " + currentVersion;
+ s_logger.error(errorMessage);
+ throw new CloudRuntimeException(errorMessage);
}
boolean supportsRollingUpgrade = true;
@@ -292,9 +292,10 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
if (!supportsRollingUpgrade && false) { // FIXME: Needs to detect if there are management servers running
// ClusterManagerImpl.arePeersRunning(null)) {
- s_logger.error("Unable to run upgrade because the upgrade sequence does not support rolling update and there are other management server nodes running");
- throw new CloudRuntimeException(
- "Unable to run upgrade because the upgrade sequence does not support rolling update and there are other management server nodes running");
+ String errorMessage =
+ "Unable to run upgrade because the upgrade sequence does not support rolling update and there are other management server nodes running";
+ s_logger.error(errorMessage);
+ throw new CloudRuntimeException(errorMessage);
}
for (DbUpgrade upgrade : upgrades) {
@@ -307,8 +308,9 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
try {
conn = txn.getConnection();
} catch (SQLException e) {
- s_logger.error("Unable to upgrade the database", e);
- throw new CloudRuntimeException("Unable to upgrade the database", e);
+ String errorMessage = "Unable to upgrade the database";
+ s_logger.error(errorMessage, e);
+ throw new CloudRuntimeException(errorMessage, e);
}
File[] scripts = upgrade.getPrepareScripts();
if (scripts != null) {
@@ -342,8 +344,9 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
txn.commit();
} catch (CloudRuntimeException e) {
- s_logger.error("Unable to upgrade the database", e);
- throw new CloudRuntimeException("Unable to upgrade the database", e);
+ String errorMessage = "Unable to upgrade the database";
+ s_logger.error(errorMessage, e);
+ throw new CloudRuntimeException(errorMessage, e);
} finally {
txn.close();
}
@@ -382,8 +385,9 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
try {
conn = txn.getConnection();
} catch (SQLException e) {
- s_logger.error("Unable to cleanup the database", e);
- throw new CloudRuntimeException("Unable to cleanup the database", e);
+ String errorMessage = "Unable to cleanup the database";
+ s_logger.error(errorMessage, e);
+ throw new CloudRuntimeException(errorMessage, e);
}
File[] scripts = upgrade.getCleanupScripts();