You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2015/01/13 07:08:10 UTC
git commit: updated refs/heads/volume-upload to c2cf250
Repository: cloudstack
Updated Branches:
refs/heads/volume-upload 631e6e008 -> c2cf2503c
volume upload: persisting the PSK only when its not present
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2cf2503
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2cf2503
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2cf2503
Branch: refs/heads/volume-upload
Commit: c2cf2503c190fa4472a49a561fd529f5b48e278f
Parents: 631e6e0
Author: Rajani Karuturi <ra...@gmail.com>
Authored: Tue Jan 13 11:37:22 2015 +0530
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Tue Jan 13 11:37:22 2015 +0530
----------------------------------------------------------------------
server/src/com/cloud/server/ConfigurationServerImpl.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2cf2503/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 0e48b26..5b2a299 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -976,7 +976,12 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
*/
private void updateSecondaryStorageVMSharedKey() {
try {
- _configDao.update(Config.SSVMPSK.key(), Config.SSVMPSK.getCategory(), getPrivateKey());
+ String key = _configDao.getValue(Config.SSVMPSK.key());
+ if(key == null) {
+ ConfigurationVO configVO = new ConfigurationVO(Config.SSVMPSK.getCategory(), "DEFAULT", Config.SSVMPSK.getComponent(), Config.SSVMPSK.key(), getPrivateKey(),
+ Config.SSVMPSK.getDescription());
+ _configDao.persist(configVO);
+ }
} catch (NoSuchAlgorithmException ex) {
s_logger.error("error generating ssvm psk", ex);
}