You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2015/11/03 16:06:34 UTC

[2/2] ambari git commit: AMBARI-13696. HDFS has issues after enabling wire encryption and reconfiguring DATANODEs (dlysnichenko)

AMBARI-13696. HDFS has issues after enabling wire encryption and reconfiguring DATANODEs (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: ca7b8298366b5cb549d6a9de838274ab2cb139f7
Parents: b5406c5
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Tue Nov 3 17:05:15 2015 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Tue Nov 3 17:06:20 2015 +0200

----------------------------------------------------------------------
 .../libraries/providers/hdfs_resource.py                  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ca7b8298/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
index 3436b97..a7aa2f8 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
@@ -128,8 +128,14 @@ class WebHDFSUtil:
                                                                           security_enabled, run_user)
     http_nn_address = namenode_ha_utils.get_property_for_active_namenode(hdfs_site, 'dfs.namenode.http-address',
                                                                          security_enabled, run_user)
-    self.is_https_enabled = hdfs_site['dfs.https.enable'] if not is_empty(hdfs_site['dfs.https.enable']) else False
-    
+
+    # check for dfs.http.policy and after that for deprecated(for newer stacks) dfs.https.enable
+    self.is_https_enabled = False
+    if not is_empty(hdfs_site['dfs.http.policy']):
+      self.is_https_enabled = hdfs_site['dfs.http.policy'].lower() == "https_only"
+    elif not is_empty(hdfs_site['dfs.https.enable']):
+      self.is_https_enabled = hdfs_site['dfs.https.enable']
+
     address = https_nn_address if self.is_https_enabled else http_nn_address
     protocol = "https" if self.is_https_enabled else "http"