Selaa lähdekoodia

AMBARI-3292: Security wizard: On NameNode HA mode, General category should have spnego principal and keytab field. (jaimin)

Jaimin Jetly 11 vuotta sitten
vanhempi
commit
787cd36f4e

+ 11 - 24
ambari-web/app/controllers/main/admin/security/add/step2.js

@@ -268,35 +268,22 @@ App.MainAdminSecurityAddStep2Controller = Em.Controller.extend({
   changeCategoryOnHa: function (serviceConfigs, stepConfigs) {
     var hdfsService = serviceConfigs.findProperty('serviceName', 'HDFS');
     if (hdfsService) {
-      var hdfsProperties = stepConfigs.findProperty('serviceName','HDFS').get('configs');
+      var hdfsProperties = stepConfigs.findProperty('serviceName', 'HDFS').get('configs');
       var configCategories = hdfsService.configCategories;
-      var dfsHttpPrincipal = hdfsProperties.findProperty('name', 'hadoop_http_principal_name');
-      var dfsHttpKeytab = hdfsProperties.findProperty('name', 'hadoop_http_keytab');
       if ((App.testMode && App.testNameNodeHA) || (this.get('content.isNnHa') === 'true')) {
-        if (dfsHttpPrincipal && dfsHttpKeytab) {
-          dfsHttpPrincipal.set('category','NameNode');
-          dfsHttpKeytab.set('category','NameNode');
-        } else {
-          dfsHttpPrincipal.set('category','General');
-          dfsHttpKeytab.set('category','General');
-        }
-        hdfsProperties.filterProperty('category','SNameNode').forEach(function(_snConfig){
-          _snConfig.set('isVisible',false);
-        },this);
-        var generalCategory = configCategories.findProperty('name','General');
-        var snCategory = configCategories.findProperty('name','SNameNode');
-        if(generalCategory) {
-          configCategories.removeObject(generalCategory);
-        }
-        if(snCategory) {
+        hdfsProperties.filterProperty('category', 'SNameNode').forEach(function (_snConfig) {
+          _snConfig.set('isVisible', false);
+        }, this);
+        var snCategory = configCategories.findProperty('name', 'SNameNode');
+        if (snCategory) {
           configCategories.removeObject(snCategory);
         }
       } else {
-        hdfsProperties.filterProperty('category','JournalNode').forEach(function(_jnConfig){
-          _jnConfig.set('isVisible',false);
-        },this);
-        var jnCategory = configCategories.findProperty('name','JournalNode');
-        if(jnCategory) {
+        hdfsProperties.filterProperty('category', 'JournalNode').forEach(function (_jnConfig) {
+          _jnConfig.set('isVisible', false);
+        }, this);
+        var jnCategory = configCategories.findProperty('name', 'JournalNode');
+        if (jnCategory) {
           configCategories.removeObject(jnCategory);
         }
       }

+ 1 - 1
ambari-web/app/data/HDP2/secure_mapping.js

@@ -131,7 +131,7 @@ module.exports = [
   },
   {
     "name": "dfs.journalnode.kerberos.internal.spnego.principal",
-    "templateName": ["journalnode_http_principal_name", "kerberos_domain"],
+    "templateName": ["hadoop_http_principal_name", "kerberos_domain"],
     "foreignKey": null,
     "value": "<templateName[0]>@<templateName[1]>",
     "filename": "hdfs-site.xml",

+ 1 - 14
ambari-web/app/data/HDP2/secure_properties.js

@@ -273,19 +273,6 @@ module.exports =
       "category": "JournalNode",
       "component": "JOURNALNODE"
     },
-    {
-      "id": "puppet var",
-      "name": "journalnode_http_principal_name",
-      "displayName": "Web principal name",
-      "value": "",
-      "defaultValue": "HTTP/_HOST",
-      "description": "Principal name for SPNEGO access for JournalNode. _HOST will get automatically replaced with actual hostname at instance of JournalNode",
-      "displayType": "principal",
-      "isVisible": false,
-      "isOverridable": false,
-      "serviceName": "HDFS",
-      "category": "JournalNode"
-    },
     {
       "id": "puppet var",
       "name": "journalnode_keytab",
@@ -373,7 +360,7 @@ module.exports =
       "displayName": "DFS web principal name",
       "value": "",
       "defaultValue": "HTTP/_HOST",
-      "description": "Principal name for SPNEGO access for NameNode and SNameNode. _HOST will get automatically replaced with actual hostname at instance of NameNode and SNameNode",
+      "description": "Principal name for SPNEGO access for HDFS components. _HOST will get automatically replaced with actual hostname at instance of HDFS component",
       "displayType": "principal",
       "isVisible": true,
       "isOverridable": false,