Updated Branches: refs/heads/master 449b5daa7 -> afaf6370d
Fix change that broke db.properties.override Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/afaf6370 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/afaf6370 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/afaf6370 Branch: refs/heads/master Commit: afaf6370dd34aacd1df5e6879e64983f8949591b Parents: 449b5da Author: Darren Shepherd <darren.s.sheph...@gmail.com> Authored: Thu Oct 31 09:20:36 2013 -0700 Committer: Darren Shepherd <darren.s.sheph...@gmail.com> Committed: Thu Oct 31 09:21:34 2013 -0700 ---------------------------------------------------------------------- engine/schema/src/com/cloud/upgrade/DatabaseCreator.java | 6 ++++++ framework/db/src/com/cloud/utils/db/TransactionLegacy.java | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/afaf6370/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java ---------------------------------------------------------------------- diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java b/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java index 3db14d8..58703ae 100755 --- a/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java +++ b/engine/schema/src/com/cloud/upgrade/DatabaseCreator.java @@ -169,6 +169,12 @@ public class DatabaseCreator { System.exit(1); } + try { + TransactionLegacy.initDataSource(dbPropsFile); + } catch (IOException e) { + e.printStackTrace(); + System.exit(1); + } initDB(dbPropsFile, rootPassword, databases, dryRun); // Process sql files http://git-wip-us.apache.org/repos/asf/cloudstack/blob/afaf6370/framework/db/src/com/cloud/utils/db/TransactionLegacy.java ---------------------------------------------------------------------- diff --git a/framework/db/src/com/cloud/utils/db/TransactionLegacy.java b/framework/db/src/com/cloud/utils/db/TransactionLegacy.java index 7cb4a98..a874ce1 100755 --- a/framework/db/src/com/cloud/utils/db/TransactionLegacy.java +++ b/framework/db/src/com/cloud/utils/db/TransactionLegacy.java @@ -1025,8 +1025,10 @@ public class TransactionLegacy { public static void initDataSource(String propsFileName) throws IOException { Properties dbProps = new Properties(); File dbPropsFile = PropertiesUtil.findConfigFile(propsFileName); - PropertiesUtil.loadFromFile(dbProps, dbPropsFile); - initDataSource(dbProps); + if (dbPropsFile != null && dbPropsFile.exists()) { + PropertiesUtil.loadFromFile(dbProps, dbPropsFile); + initDataSource(dbProps); + } } public static void initDataSource(Properties dbProps) {