Parcourir la source

AMBARI-2533. WebHcat tests fail since the proxy group and hosts is not set for HTTP principle. (jaimin)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1498742 13f79535-47bb-0310-9956-ffa450edef68
Jaimin Jetly il y a 12 ans
Parent
commit
26d853e121

+ 9 - 0
ambari-web/app/controllers/main/admin/security/add/step3.js

@@ -356,6 +356,15 @@ App.MainAdminSecurityAddStep3Controller = Em.Controller.extend({
         value: hiveHostName
       });
     }
+    var webHcatComponent =  App.Service.find('WEBHCAT').get('hostComponents').findProperty('componentName', 'WEBHCAT_SERVER');
+    if(this.isWebHcatSelected() && webHcatComponent) {
+     var webHcatHostName =  webHcatComponent.get('host.hostName');
+      this.get('globalProperties').pushObject({
+        id: 'puppet var',
+        name: 'webhcat_server',
+        value: webHcatHostName
+      });
+    }
   },
 
   loadStaticGlobal: function () {

+ 16 - 0
ambari-web/app/data/secure_mapping.js

@@ -457,6 +457,22 @@ module.exports = [
     "value": "<templateName[0]>",
     "filename": "core-site.xml",
     "serviceName": "OOZIE"
+  },
+  {
+    "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
+    "templateName": ["proxyuser_group"],
+    "foreignKey": ["webHCat_http_primary_name"],
+    "value": "<templateName[0]>",
+    "filename": "core-site.xml",
+    "serviceName": "WEBHCAT"
+  },
+  {
+    "name": "hadoop.proxyuser.<foreignKey[0]>.hosts",
+    "templateName": ["webhcat_server"],
+    "foreignKey": ["webHCat_http_primary_name"],
+    "value": "<templateName[0]>",
+    "filename": "core-site.xml",
+    "serviceName": "WEBHCAT"
   }
 ];