ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stoa...@apache.org
Subject ambari git commit: AMBARI-15242. Ambari overrides trustore when executing "ambari-server setup-ldap". (Daniel Gergely via stoader)
Date Thu, 03 Mar 2016 08:03:58 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 353736cad -> 2ff6c32d3


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/2ff6c32d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ff6c32d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ff6c32d

Branch: refs/heads/trunk
Commit: 2ff6c32d390453c7c29f1e279818ff7cade62b02
Parents: 353736c
Author: Toader, Sebastian <stoader@hortonworks.com>
Authored: Thu Mar 3 08:48:19 2016 +0100
Committer: Toader, Sebastian <stoader@hortonworks.com>
Committed: Thu Mar 3 08:50:05 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/2ff6c32d/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 5f32aff..b0ea491 100644
--- a/ambari-server/src/main/python/ambari_server/setupSecurity.py
+++ b/ambari-server/src/main/python/ambari_server/setupSecurity.py
@@ -671,10 +671,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
 


Mime
View raw message