Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-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 B0EF518031 for ; Thu, 3 Mar 2016 07:49:10 +0000 (UTC) Received: (qmail 40745 invoked by uid 500); 3 Mar 2016 07:49:10 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 40709 invoked by uid 500); 3 Mar 2016 07:49:10 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 40700 invoked by uid 99); 3 Mar 2016 07:49:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2016 07:49:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7D354E384C; Thu, 3 Mar 2016 07:49:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stoader@apache.org To: commits@ambari.apache.org Message-Id: <9cdb4d40429c4884a815c45bd7f31f43@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-15242. Ambari overrides trustore when executing "ambari-server setup-ldap". (Daniel Gergely via stoader) Date: Thu, 3 Mar 2016 07:49:10 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/branch-2.2 14fbdd610 -> a1977030f AMBARI-15242. Ambari overrides trustore when executing "ambari-server setup-ldap". (Daniel Gergely via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a1977030 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a1977030 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a1977030 Branch: refs/heads/branch-2.2 Commit: a1977030fff73b2dc9eda336db611bc7ac512078 Parents: 14fbdd6 Author: Toader, Sebastian Authored: Thu Mar 3 08:48:19 2016 +0100 Committer: Toader, Sebastian Committed: Thu Mar 3 08:48:19 2016 +0100 ---------------------------------------------------------------------- .../src/main/python/ambari_server/setupSecurity.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a1977030/ambari-server/src/main/python/ambari_server/setupSecurity.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari_server/setupSecurity.py b/ambari-server/src/main/python/ambari_server/setupSecurity.py index 4f16bc2..71bbc2e 100644 --- a/ambari-server/src/main/python/ambari_server/setupSecurity.py +++ b/ambari-server/src/main/python/ambari_server/setupSecurity.py @@ -663,10 +663,15 @@ def setup_ldap(): ldap_property_value_map[SSL_TRUSTSTORE_PATH_PROPERTY] = ts_path ldap_property_value_map[SSL_TRUSTSTORE_PASSWORD_PROPERTY] = ts_password pass - else: - properties.removeOldProp(SSL_TRUSTSTORE_TYPE_PROPERTY) - properties.removeOldProp(SSL_TRUSTSTORE_PATH_PROPERTY) - properties.removeOldProp(SSL_TRUSTSTORE_PASSWORD_PROPERTY) + elif properties.get_property(SSL_TRUSTSTORE_TYPE_PROPERTY): + print 'The TrustStore is already configured: ' + print ' ' + SSL_TRUSTSTORE_TYPE_PROPERTY + ' = ' + properties.get_property(SSL_TRUSTSTORE_TYPE_PROPERTY) + print ' ' + SSL_TRUSTSTORE_PATH_PROPERTY + ' = ' + properties.get_property(SSL_TRUSTSTORE_PATH_PROPERTY) + print ' ' + SSL_TRUSTSTORE_PASSWORD_PROPERTY + ' = ' + properties.get_property(SSL_TRUSTSTORE_PASSWORD_PROPERTY) + if get_YN_input("Do you want to remove these properties [y/n] (y)? ", True): + properties.removeOldProp(SSL_TRUSTSTORE_TYPE_PROPERTY) + properties.removeOldProp(SSL_TRUSTSTORE_PATH_PROPERTY) + properties.removeOldProp(SSL_TRUSTSTORE_PASSWORD_PROPERTY) pass pass