incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject git commit: refs/heads/4.1 - Summary: We need the integrity checkers to run
Date Tue, 05 Feb 2013 22:52:10 GMT
Updated Branches:
  refs/heads/4.1 2a63dbe59 -> 5793a0c59


Summary: We need the integrity checkers to run

The EncryptionSecretKeyChecker is required to load db.properties with
encrypted passwords.

Make usre the integrity checkers are run before anything else during
start-up(cherry picked from commit 9d134f0f19ed995af04fb4fe469eb81e15634026)

Signed-off-by: Hugo Trippaers <trippie@gmail.com>


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

Branch: refs/heads/4.1
Commit: 5793a0c597e10461559d45e787a7078148e92eb0
Parents: 2a63dbe
Author: Hugo Trippaers <trippie@gmail.com>
Authored: Tue Feb 5 23:48:51 2013 +0100
Committer: Hugo Trippaers <trippie@gmail.com>
Committed: Tue Feb 5 23:51:55 2013 +0100

----------------------------------------------------------------------
 client/tomcatconf/componentContext.xml.in          |    1 +
 .../cloud/utils/component/ComponentContext.java    |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5793a0c5/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index 11017fe..de013de 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -35,6 +35,7 @@
       Compose a CloudStack deployment with selected components here
   -->
   <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
+  <bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker"
/>
   
   <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" />
   <bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl"
/>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5793a0c5/utils/src/com/cloud/utils/component/ComponentContext.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/ComponentContext.java b/utils/src/com/cloud/utils/component/ComponentContext.java
index 1b15f00..716abb3 100644
--- a/utils/src/com/cloud/utils/component/ComponentContext.java
+++ b/utils/src/com/cloud/utils/component/ComponentContext.java
@@ -19,6 +19,7 @@ package com.cloud.utils.component;
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.MBeanRegistrationException;
@@ -64,6 +65,13 @@ public class ComponentContext implements ApplicationContextAware {
     } 
 
     public static void initComponentsLifeCycle() {
+        // Run the SystemIntegrityCheckers first
+        Map<String, SystemIntegrityChecker> integrityCheckers = getApplicationContext().getBeansOfType(SystemIntegrityChecker.class);
+        for (Entry<String,SystemIntegrityChecker> entry : integrityCheckers.entrySet()
){
+            s_logger.info ("Running SystemIntegrityChecker " + entry.getKey());
+            entry.getValue().check();
+        }
+        
     	Map<String, ComponentLifecycle> lifecyleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class);
  
     	Map[] classifiedComponents = new Map[ComponentLifecycle.MAX_RUN_LEVELS];


Mime
View raw message