cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject git commit: updated refs/heads/volume-upload to c2cf250
Date Tue, 13 Jan 2015 06:08:10 GMT
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 <rajanikaruturi@gmail.com>
Authored: Tue Jan 13 11:37:22 2015 +0530
Committer: Rajani Karuturi <rajanikaruturi@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);
         }


Mime
View raw message