Skip to content

Commit b4605fb

Browse files
author
Sheng Yang
committed
Fix SSL Keystore path in the development version
Now the cloud.keystore would at the same path as file "db.properties", which should make both development version and distribution version happy.
1 parent 5ce631e commit b4605fb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎server/src/com/cloud/server/ConfigurationServerImpl.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,14 @@ protected void updateSSLKeystore() {
458458
}
459459

460460
String dbString = _configDao.getValue("ssl.keystore");
461-
String keystorePath = "/etc/cloud/management/cloud.keystore";
461+
File confFile= PropertiesUtil.findConfigFile("db.properties");
462+
/* This line may throw a NPE, but that's due to fail to find db.properities, meant some bugs in the other places */
463+
String confPath = confFile.getParent();
464+
String keystorePath = confPath + "/cloud.keystore";
462465
File keystoreFile = new File(keystorePath);
463466
boolean dbExisted = (dbString != null && !dbString.isEmpty());
464467

468+
s_logger.info("SSL keystore located at " + keystorePath);
465469
try {
466470
if (!dbExisted) {
467471
if (!keystoreFile.exists()) {

0 commit comments

Comments
 (0)