You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2013/10/07 20:58:18 UTC

git commit: updated refs/heads/spring-modularization to d769a73

Updated Branches:
  refs/heads/spring-modularization 614922ff3 -> d769a73cf


Fix DatabaseUpgradeChecker in standalone context

When running DatabaseUpgradeChecker as a standalone program _dao will not
be injected.  Still create an instance of VersionDaoImpl in constructor
and when DatabaseUpgradeChecker is ran in the mgmt server it will be
overwritten by the injected value.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d769a73c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d769a73c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d769a73c

Branch: refs/heads/spring-modularization
Commit: d769a73cfc1b5728b2fe917e322b2109c3f5284e
Parents: 614922f
Author: Darren Shepherd <da...@gmail.com>
Authored: Mon Oct 7 11:57:37 2013 -0700
Committer: Darren Shepherd <da...@gmail.com>
Committed: Mon Oct 7 11:57:55 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d769a73c/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 1afd056..6020bbb 100755
--- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -67,6 +67,7 @@ import com.cloud.upgrade.dao.Upgrade420to430;
 import com.cloud.upgrade.dao.UpgradeSnapshot217to224;
 import com.cloud.upgrade.dao.UpgradeSnapshot223to224;
 import com.cloud.upgrade.dao.VersionDao;
+import com.cloud.upgrade.dao.VersionDaoImpl;
 import com.cloud.upgrade.dao.VersionVO;
 import com.cloud.upgrade.dao.VersionVO.Step;
 import com.cloud.utils.component.SystemIntegrityChecker;
@@ -85,6 +86,8 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker {
     VersionDao _dao;
 
     public DatabaseUpgradeChecker() {
+        _dao = new VersionDaoImpl();
+
         _upgradeMap.put("2.1.7", new DbUpgrade[] {new Upgrade217to218(), new Upgrade218to22(), new Upgrade221to222(),
                 new UpgradeSnapshot217to224(), new Upgrade222to224(), new Upgrade224to225(), new Upgrade225to226(),
                 new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),