瀏覽代碼

AMBARI-9909. Move Master Wizard 'Manual Commands' page doesn't load in secure cluster for Webhcat server and MySQL server.

Jaimin Jetly 10 年之前
父節點
當前提交
1710156e29

+ 1 - 1
ambari-web/app/controllers/main/service/reassign/step1_controller.js

@@ -102,7 +102,7 @@ App.ReassignMasterWizardStep1Controller = Em.Controller.extend({
     databaseType = databaseProperty.match(/MySQL|PostgreS|Oracle|Derby|MSSQL/gi)[0];
     this.set('databaseType', databaseType);
 
-    if (databaseType !== 'derby') {
+    if (this.get('content.reassign.component_name') == 'OOZIE_SERVER' && databaseType !== 'derby') {
       App.router.reassignMasterController.set('content.hasManualSteps', false);
     } else {
       App.router.reassignMasterController.set('content.hasManualSteps', true);

+ 35 - 0
ambari-web/app/controllers/main/service/reassign/step4_controller.js

@@ -206,6 +206,41 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
           principal: 'oozie.service.HadoopAccessorService.kerberos.principal'
         }
       ]
+    },
+    {
+      componentName: 'WEBHCAT_SERVER',
+      configs: [
+        {
+          site: 'webhcat-site',
+          keytab: 'templeton.kerberos.keytab',
+          principal: 'templeton.kerberos.principal'
+        }
+      ]
+    },
+    {
+      componentName: 'HIVE_SERVER',
+      configs: [
+        {
+          site: 'hive-site',
+          keytab: 'hive.server2.authentication.kerberos.keytab',
+          principal: 'hive.server2.authentication.kerberos.principal'
+        },
+        {
+          site: 'hive-site',
+          keytab: 'hive.server2.authentication.spnego.keytab',
+          principal: 'hive.server2.authentication.spnego.principal'
+        }
+      ]
+    },
+    {
+      componentName: 'HIVE_METASTORE',
+      configs: [
+        {
+          site: 'hive-site',
+          keytab: 'hive.metastore.kerberos.keytab.file',
+          principal: 'hive.metastore.kerberos.principal'
+        }
+      ]
     }
 
   ],

+ 11 - 7
ambari-web/app/controllers/main/service/reassign_controller.js

@@ -59,7 +59,8 @@ App.ReassignMasterController = App.WizardController.extend({
     hasManualSteps: false,
     hasCheckDBStep: false,
     componentsWithCheckDBStep: ['HIVE_METASTORE', 'HIVE_SERVER', 'OOZIE_SERVER'],
-    securityEnabled: false
+    securityEnabled: false,
+    componentsWithoutSecurityConfigs: ['MYSQL_SERVER']
   }),
 
   /**
@@ -287,12 +288,15 @@ App.ReassignMasterController = App.WizardController.extend({
   loadDatabaseType: function () {
     var databaseType = this.getDBProperty('databaseType');
     this.set('content.databaseType', databaseType);
-
-    if (this.get('content.hasCheckDBStep') && databaseType && databaseType !== 'derby') {
-      // components with manual commands
-      var manual = App.router.reassignMasterController.get('content.componentsWithManualCommands').without('OOZIE_SERVER');
-      App.router.reassignMasterController.set('content.hasManualSteps', false);
-      App.router.reassignMasterController.set('content.componentsWithManualCommands', manual);
+    var component = this.get('content.reassign.component_name');
+
+    if (component === 'OOZIE_SERVER') {
+      if (this.get('content.hasCheckDBStep') && databaseType && databaseType !== 'derby') {
+        // components with manual commands
+        var manual = App.router.reassignMasterController.get('content.componentsWithManualCommands').without('OOZIE_SERVER');
+        App.router.reassignMasterController.set('content.hasManualSteps', false);
+        App.router.reassignMasterController.set('content.componentsWithManualCommands', manual);
+      }
     }
   },
 

+ 4 - 0
ambari-web/app/views/main/service/reassign/step5_view.js

@@ -49,6 +49,10 @@ App.ReassignMasterWizardStep5View = Em.View.extend({
   securityNotice: function () {
     var secureConfigs = this.get('controller.content.secureConfigs');
     var proceedMsg = Em.I18n.t('services.reassign.step5.body.proceedMsg');
+    var hasSecureConfigs = !this.get('controller.content.componentsWithoutSecurityConfigs').contains(this.get('controller.content.reassign.component_name'));
+    if(!hasSecureConfigs) {
+      secureConfigs = [];
+    }
     if (!this.get('controller.content.securityEnabled') || !secureConfigs.length) {
       return proceedMsg;
     }