Updated Branches: refs/heads/trunk 57281c722 -> e97086946
AMBARI-2859 - Error encountered running ambari-server encrypt-passwords / setup-ganglia-https / setup-nagios-https Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/e9708694 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/e9708694 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/e9708694 Branch: refs/heads/trunk Commit: e970869466916f6e737ffb1269bfa32667a12fc3 Parents: 57281c7 Author: tbeerbower <[email protected]> Authored: Fri Aug 9 18:15:02 2013 -0400 Committer: tbeerbower <[email protected]> Committed: Fri Aug 9 18:23:19 2013 -0400 ---------------------------------------------------------------------- ambari-server/src/main/python/ambari-server.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/e9708694/ambari-server/src/main/python/ambari-server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index b098a85..6a59b11 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -2606,11 +2606,9 @@ def encrypt_password(alias, password): properties = get_ambari_properties() if properties == -1: raise FatalException(1, None) - return get_encrypted_password(alias, password, properties) def get_encrypted_password(alias, password, properties): - isSecure = get_is_secure(properties) (isPersisted, masterKeyFile) = get_is_persisted(properties) if isSecure: @@ -3155,17 +3153,18 @@ def get_truststore_path(properties): def get_truststore_password(properties): truststore_password = properties.get_property(SSL_TRUSTSTORE_PASSWORD_PROPERTY) + isSecure = get_is_secure(properties) if truststore_password: - truststore_password = decrypt_password_for_alias(SSL_TRUSTSTORE_PASSWORD_ALIAS) + if isSecure: + truststore_password = decrypt_password_for_alias(SSL_TRUSTSTORE_PASSWORD_ALIAS) else: truststore_password = read_password("", ".*", "Password for TrustStore:", "Invalid characters in password") if truststore_password: - properties.process_pair(SECURITY_IS_ENCRYPTION_ENABLED, "true") encrypted_password = get_encrypted_password(SSL_TRUSTSTORE_PASSWORD_ALIAS, truststore_password, properties) properties.process_pair(SSL_TRUSTSTORE_PASSWORD_PROPERTY, encrypted_password) return truststore_password - + def run_component_https_cmd(cmd): retcode, out, err = run_os_command(cmd)
