浏览代码

AMBARI-7715. HDP 2.2 Stack Advisor ignores dfs.http.policy value (dlysnichenko)

Lisnichenko Dmitro 10 年之前
父节点
当前提交
3d7fa6a44c

+ 8 - 0
ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/configuration/hdfs-site.xml

@@ -197,6 +197,14 @@
     </description>
     </description>
   </property>
   </property>
 
 
+  <property>
+    <name>dfs.datanode.https.address</name>
+    <value>0.0.0.0:50475</value>
+    <description>
+      The datanode https server address and port.
+    </description>
+  </property>
+
   <property>
   <property>
     <name>dfs.blocksize</name>
     <name>dfs.blocksize</name>
     <value>134217728</value>
     <value>134217728</value>

+ 8 - 0
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HDFS/configuration/hdfs-site.xml

@@ -159,6 +159,14 @@
     </description>
     </description>
   </property>
   </property>
 
 
+  <property>
+    <name>dfs.datanode.https.address</name>
+    <value>0.0.0.0:50475</value>
+    <description>
+      The datanode https server address and port.
+    </description>
+  </property>
+
   <property>
   <property>
     <name>dfs.block.size</name>
     <name>dfs.block.size</name>
     <value>134217728</value>
     <value>134217728</value>

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

@@ -163,14 +163,4 @@ RULE[2:$1%$2@$0](.%admin@APACHE.ORG)s/./admin/
 DEFAULT
 DEFAULT
     </description>
     </description>
   </property>
   </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>
 </configuration>

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

@@ -196,6 +196,14 @@
     </description>
     </description>
   </property>
   </property>
 
 
+  <property>
+    <name>dfs.datanode.https.address</name>
+    <value>0.0.0.0:50475</value>
+    <description>
+      The datanode https server address and port.
+    </description>
+  </property>
+
   <property>
   <property>
     <name>dfs.blocksize</name>
     <name>dfs.blocksize</name>
     <value>134217728</value>
     <value>134217728</value>
@@ -494,4 +502,14 @@ don't exist, they will be created with this permission.</description>
       When enabled, a recovery of any failed directory is attempted during checkpoint.</description>
       When enabled, a recovery of any failed directory is attempted during checkpoint.</description>
   </property>
   </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>
 </configuration>

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

@@ -177,14 +177,4 @@ DEFAULT
     </description>
     </description>
   </property>
   </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>
 </configuration>

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

@@ -197,6 +197,14 @@
     </description>
     </description>
   </property>
   </property>
 
 
+  <property>
+    <name>dfs.datanode.https.address</name>
+    <value>0.0.0.0:50475</value>
+    <description>
+      The datanode https server address and port.
+    </description>
+  </property>
+
   <property>
   <property>
     <name>dfs.blocksize</name>
     <name>dfs.blocksize</name>
     <value>134217728</value>
     <value>134217728</value>
@@ -493,4 +501,14 @@
       When enabled, a recovery of any failed directory is attempted during checkpoint.</description>
       When enabled, a recovery of any failed directory is attempted during checkpoint.</description>
   </property>
   </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>
 </configuration>

+ 3 - 3
ambari-server/src/test/python/stacks/2.1/configs/default-storm-start.json

@@ -204,7 +204,8 @@
             "dfs.datanode.data.dir.perm": "750", 
             "dfs.datanode.data.dir.perm": "750", 
             "dfs.namenode.name.dir.restore": "true", 
             "dfs.namenode.name.dir.restore": "true", 
             "dfs.replication.max": "50", 
             "dfs.replication.max": "50", 
-            "dfs.namenode.checkpoint.period": "21600"
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.http.policy": "HTTP_ONLY"
         }, 
         }, 
         "storm-env": {
         "storm-env": {
             "content": "\n#!/bin/bash\n\n# Set Storm specific environment variables here.\n\n# The java implementation to use.\nexport JAVA_HOME={{java64_home}}\n\n# export STORM_CONF_DIR=\"\"", 
             "content": "\n#!/bin/bash\n\n# Set Storm specific environment variables here.\n\n# The java implementation to use.\nexport JAVA_HOME={{java64_home}}\n\n# export STORM_CONF_DIR=\"\"", 
@@ -215,7 +216,6 @@
         "core-site": {
         "core-site": {
             "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
             "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
             "fs.trash.interval": "360", 
             "fs.trash.interval": "360", 
-            "dfs.http.policy": "HTTP_ONLY", 
             "hadoop.security.authentication": "simple", 
             "hadoop.security.authentication": "simple", 
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec", 
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec", 
             "hadoop.proxyuser.falcon.hosts": "*", 
             "hadoop.proxyuser.falcon.hosts": "*", 
@@ -353,4 +353,4 @@
             "c6402.ambari.apache.org"
             "c6402.ambari.apache.org"
         ]
         ]
     }
     }
-}
+}

+ 3 - 3
ambari-server/src/test/python/stacks/2.1/configs/secured-storm-start.json

@@ -209,7 +209,8 @@
             "dfs.datanode.data.dir.perm": "750", 
             "dfs.datanode.data.dir.perm": "750", 
             "dfs.namenode.name.dir.restore": "true", 
             "dfs.namenode.name.dir.restore": "true", 
             "dfs.replication.max": "50", 
             "dfs.replication.max": "50", 
-            "dfs.namenode.checkpoint.period": "21600"
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.http.policy": "HTTP_ONLY"
         }, 
         }, 
         "storm-env": {
         "storm-env": {
             "storm_log_dir": "/var/log/storm", 
             "storm_log_dir": "/var/log/storm", 
@@ -226,7 +227,6 @@
         "core-site": {
         "core-site": {
             "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
             "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization", 
             "fs.trash.interval": "360", 
             "fs.trash.interval": "360", 
-            "dfs.http.policy": "HTTP_ONLY", 
             "hadoop.security.authentication": "kerberos", 
             "hadoop.security.authentication": "kerberos", 
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec", 
             "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec", 
             "hadoop.proxyuser.falcon.hosts": "*", 
             "hadoop.proxyuser.falcon.hosts": "*", 
@@ -370,4 +370,4 @@
             "c6402.ambari.apache.org"
             "c6402.ambari.apache.org"
         ]
         ]
     }
     }
-}
+}

+ 4 - 3
ambari-web/app/views/common/quick_view_link_view.js

@@ -308,11 +308,12 @@ App.QuickViewLinks = Em.View.extend({
   setProtocol: function (service_id, configProperties, ambariProperties) {
   setProtocol: function (service_id, configProperties, ambariProperties) {
     var hadoopSslEnabled = false;
     var hadoopSslEnabled = false;
     if (configProperties && configProperties.length > 0) {
     if (configProperties && configProperties.length > 0) {
-      var site = configProperties.findProperty('type', 'core-site');
+      var coreSite = configProperties.findProperty('type', 'core-site');
+      var hdfsSite = configProperties.findProperty('type', 'hdfs-site');
       if (App.get('isHadoop2Stack')) {
       if (App.get('isHadoop2Stack')) {
-        hadoopSslEnabled = (Em.get(site, 'properties') && site.properties['dfs.http.policy'] === 'HTTPS_ONLY');
+        hadoopSslEnabled = (Em.get(hdfsSite, 'properties') && hdfsSite.properties['dfs.http.policy'] === 'HTTPS_ONLY');
       } else {
       } else {
-        hadoopSslEnabled = (Em.get(site, 'properties') &&  site.properties['hadoop.ssl.enabled'] == true);
+        hadoopSslEnabled = (Em.get(coreSite, 'properties') && coreSite.properties['hadoop.ssl.enabled'] == true);
       }
       }
     }
     }
     switch (service_id) {
     switch (service_id) {

+ 3 - 3
contrib/views/slider/src/main/resources/ui/app/assets/data/apps/apps.json

@@ -1108,7 +1108,6 @@
           "container_1411422858327_0005_01_000006.app.monitor" : "mop-3.c.pramod-thangali.internal:43240/master-status"
           "container_1411422858327_0005_01_000006.app.monitor" : "mop-3.c.pramod-thangali.internal:43240/master-status"
         },
         },
         "core-site" : {
         "core-site" : {
-          "dfs.http.policy" : "HTTP_ONLY",
           "fs.defaultFS" : "hdfs://mop-5.c.pramod-thangali.internal:8020",
           "fs.defaultFS" : "hdfs://mop-5.c.pramod-thangali.internal:8020",
           "fs.trash.interval" : "360",
           "fs.trash.interval" : "360",
           "hadoop.proxyuser.falcon.groups" : "users",
           "hadoop.proxyuser.falcon.groups" : "users",
@@ -1224,7 +1223,8 @@
           "dfs.web.authentication.kerberos.keytab" : "/etc/security/keytabs/spnego.service.keytab",
           "dfs.web.authentication.kerberos.keytab" : "/etc/security/keytabs/spnego.service.keytab",
           "dfs.web.authentication.kerberos.principal" : "HTTP/_HOST@EXAMPLE.COM",
           "dfs.web.authentication.kerberos.principal" : "HTTP/_HOST@EXAMPLE.COM",
           "dfs.webhdfs.enabled" : "true",
           "dfs.webhdfs.enabled" : "true",
-          "fs.permissions.umask-mode" : "022"
+          "fs.permissions.umask-mode" : "022",
+          "dfs.http.policy" : "HTTP_ONLY"
         },
         },
         "logfolders" : {
         "logfolders" : {
           "HBASE_MASTER->mop-3.c.pramod-thangali.internal->AGENT_LOG_ROOT->container_1411422858327_0005_01_000006" : "/hadoop/yarn/log/application_1411422858327_0005/container_1411422858327_0005_01_000006",
           "HBASE_MASTER->mop-3.c.pramod-thangali.internal->AGENT_LOG_ROOT->container_1411422858327_0005_01_000006" : "/hadoop/yarn/log/application_1411422858327_0005/container_1411422858327_0005_01_000006",
@@ -1317,4 +1317,4 @@
       }
       }
     }
     }
   ]
   ]
-}
+}