Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3898F10B9B for ; Mon, 8 Dec 2014 10:09:01 +0000 (UTC) Received: (qmail 86334 invoked by uid 500); 8 Dec 2014 10:08:50 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 86233 invoked by uid 500); 8 Dec 2014 10:08:50 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 85530 invoked by uid 99); 8 Dec 2014 10:08:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Dec 2014 10:08:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DA9349C0AA9; Mon, 8 Dec 2014 10:08:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rajani@apache.org To: commits@cloudstack.apache.org Date: Mon, 08 Dec 2014 10:09:09 -0000 Message-Id: <853e9d592fe7438890e63247478f1af4@git.apache.org> In-Reply-To: <688e4767e27c455d8a8ee5bf2c0c53f2@git.apache.org> References: <688e4767e27c455d8a8ee5bf2c0c53f2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/50] [abbrv] git commit: updated refs/heads/master to b61733d CLOUDSTACK-7999: Always override local keystore file with the entry in DB Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c987080c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c987080c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c987080c Branch: refs/heads/master Commit: c987080c266f4ddb973736a3beb2bf2b07f287b0 Parents: 3a36681 Author: Sheng Yang Authored: Mon Dec 1 18:52:15 2014 -0800 Committer: Sheng Yang Committed: Mon Dec 1 18:59:25 2014 -0800 ---------------------------------------------------------------------- server/src/com/cloud/server/ConfigurationServerImpl.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c987080c/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 7b0d898..306c0e7 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -638,13 +638,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio "SSL Keystore for the management servers"); _configDao.persist(configVO); s_logger.info("Stored SSL keystore to database."); - } else if (null != keystoreFile && keystoreFile.exists()) { // and dbExisted - // Check if they are the same one, otherwise override with local keystore - String base64Keystore = getBase64Keystore(keystorePath); - if (base64Keystore.compareTo(dbString) != 0) { - _configDao.update("ssl.keystore", "Hidden", base64Keystore); - s_logger.info("Updated database keystore with local one."); - } } else { // !keystoreFile.exists() and dbExisted // Export keystore to local file byte[] storeBytes = Base64.decodeBase64(dbString); @@ -654,6 +647,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio fo.write(storeBytes); fo.close(); Script script = new Script(true, "cp", 5000, null); + script.add("-f"); script.add(tmpKeystorePath); //There is a chance, although small, that the keystorePath is null. In that case, do not add it to the script.