Skip to content

Commit 9d134f0

Browse files
committed
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
1 parent f89dd90 commit 9d134f0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

client/tomcatconf/componentContext.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
Compose a CloudStack deployment with selected components here
3636
-->
3737
<bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
38+
<bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
3839

3940
<bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" />
4041
<bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />

utils/src/com/cloud/utils/component/ComponentContext.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import java.util.HashMap;
2121
import java.util.Map;
22+
import java.util.Map.Entry;
2223

2324
import javax.management.InstanceAlreadyExistsException;
2425
import javax.management.MBeanRegistrationException;
@@ -64,6 +65,13 @@ public static ApplicationContext getApplicationContext() {
6465
}
6566

6667
public static void initComponentsLifeCycle() {
68+
// Run the SystemIntegrityCheckers first
69+
Map<String, SystemIntegrityChecker> integrityCheckers = getApplicationContext().getBeansOfType(SystemIntegrityChecker.class);
70+
for (Entry<String,SystemIntegrityChecker> entry : integrityCheckers.entrySet() ){
71+
s_logger.info ("Running SystemIntegrityChecker " + entry.getKey());
72+
entry.getValue().check();
73+
}
74+
6775
Map<String, ComponentLifecycle> lifecyleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class);
6876

6977
Map[] classifiedComponents = new Map[ComponentLifecycle.MAX_RUN_LEVELS];

0 commit comments

Comments
 (0)