Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 2c26dbab2 -> 21190abe1


AMBARI-17766 ZOOKEEPER_SERVER START is failed after upgrade from 2.1.1 to 
2.4.0.0 and making adding ZK server (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21190abe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21190abe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21190abe

Branch: refs/heads/branch-2.4
Commit: 21190abe158ca8993fd768a9e7b576da4789fb8c
Parents: 2c26dba
Author: Dmytro Sen <[email protected]>
Authored: Mon Jul 18 14:20:12 2016 +0300
Committer: Dmytro Sen <[email protected]>
Committed: Mon Jul 18 14:21:55 2016 +0300

----------------------------------------------------------------------
 .../resources/stacks/HDP/2.3/services/stack_advisor.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/21190abe/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 373553c..928fa95 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -256,12 +256,19 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
       atlas_rest_host = atlas_server_host_info['Hosts']['host_name']
       scheme = "http"
       metadata_port = "21000"
+      atlas_server_default_https_port = "21443"
+      tls_enabled = "false"
       if 'application-properties' in services['configurations']:
-        tls_enabled = 
services['configurations']['application-properties']['properties']['atlas.enableTLS']
-        metadata_port =  
services['configurations']['application-properties']['properties']['atlas.server.http.port']
+        if 'atlas.enableTLS' in 
services['configurations']['application-properties']['properties']:
+          tls_enabled = 
services['configurations']['application-properties']['properties']['atlas.enableTLS']
+        if 'atlas.server.http.port' in 
services['configurations']['application-properties']['properties']:
+          metadata_port = 
services['configurations']['application-properties']['properties']['atlas.server.http.port']
         if tls_enabled.lower() == "true":
           scheme = "https"
-          metadata_port =  
services['configurations']['application-properties']['properties']['atlas.server.https.port']
+          if 'atlas.server.https.port' in 
services['configurations']['atlas.server.https.port']['properties']:
+            metadata_port =  
services['configurations']['application-properties']['properties']['atlas.server.https.port']
+          else:
+            metadata_port = atlas_server_default_https_port
       putHiveSiteProperty('atlas.rest.address', '{0}://{1}:{2}'.format(scheme, 
atlas_rest_host, metadata_port))
     else:
       putHiveSitePropertyAttribute('atlas.cluster.name', 'delete', 'true')

Reply via email to