Browse Source

AMBARI-7312. Ambari namenode UI link checks deprecated property for ssl enabled hdfs for HDP 2.1.x. (Denys Buzhor via akovalenko)

Aleksandr Kovalenko 11 years ago
parent
commit
8dd0e81d8c

+ 9 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6.GlusterFS/services/HDFS/configuration/core-site.xml

@@ -164,4 +164,13 @@ DEFAULT
     </description>
   </property>
 
+  <property>
+    <name>dfs.http.policy</name>
+    <value>HTTP_ONLY</value>
+    <description>
+      Decide if HTTPS(SSL) is supported on HDFS This configures the HTTP endpoint for HDFS daemons:
+      The following values are supported: - HTTP_ONLY : Service is provided only on http - HTTPS_ONLY :
+      Service is provided only on https - HTTP_AND_HTTPS : Service is provided both on http and https
+    </description>
+  </property>
 </configuration>

+ 10 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/configuration/core-site.xml

@@ -177,4 +177,14 @@ DEFAULT
     </description>
   </property>
 
+  <property>
+    <name>dfs.http.policy</name>
+    <value>HTTP_ONLY</value>
+    <description>
+      Decide if HTTPS(SSL) is supported on HDFS This configures the HTTP endpoint for HDFS daemons:
+      The following values are supported: - HTTP_ONLY : Service is provided only on http - HTTPS_ONLY :
+      Service is provided only on https - HTTP_AND_HTTPS : Service is provided both on http and https
+    </description>
+  </property>
+
 </configuration>

+ 5 - 1
ambari-web/app/views/common/quick_view_link_view.js

@@ -309,7 +309,11 @@ App.QuickViewLinks = Em.View.extend({
     var hadoopSslEnabled = false;
     if (configProperties && configProperties.length > 0) {
       var site = configProperties.findProperty('type', 'core-site');
-      hadoopSslEnabled = (site && site.properties && site.properties['hadoop.ssl.enabled'] == true);
+      if (parseInt(App.get('currentStackVersionNumber')[0]) > 1) {
+        hadoopSslEnabled = (Em.get(site, 'properties') && site.properties['dfs.http.policy'] === 'HTTPS_ONLY');
+      } else {
+        hadoopSslEnabled = (Em.get(site, 'properties') &&  site.properties['hadoop.ssl.enabled'] == true);
+      }
     }
     switch (service_id) {
       case "GANGLIA":