You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by st...@apache.org on 2016/03/03 08:49:10 UTC

ambari git commit: AMBARI-15242. Ambari overrides trustore when executing "ambari-server setup-ldap". (Daniel Gergely via stoader)

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 <st...@hortonworks.com>
Authored: Thu Mar 3 08:48:19 2016 +0100
Committer: Toader, Sebastian <st...@hortonworks.com>
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