瀏覽代碼

AMBARI-9846. Oozie Service Check Fails after Moving Oozie Server (alexantonenko)

Alex Antonenko 10 年之前
父節點
當前提交
44e8ea4f56

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

@@ -104,6 +104,8 @@ App.ReassignMasterWizardStep1Controller = Em.Controller.extend({
 
     if (databaseType !== 'derby') {
       App.router.reassignMasterController.set('content.hasManualSteps', false);
+    } else {
+      App.router.reassignMasterController.set('content.hasManualSteps', true);
     }
 
     var serviceDbProp = this.get('content.reassign.service_id').toLowerCase() + "_database";

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

@@ -124,6 +124,9 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
         configs: {
           'oozie-site': {
             'oozie.base.url': 'http://<replace-value>:11000/oozie'
+          },
+          'core-site': {
+            'hadoop.proxyuser.oozie.hosts': '<replace-value>'
           }
         }
     },
@@ -475,6 +478,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
         break;
       case 'OOZIE_SERVER':
         urlParams.push('(type=oozie-site&tag=' + data.Clusters.desired_configs['oozie-site'].tag + ')');
+        urlParams.push('(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag + ')');
         break;
       case 'HIVE_SERVER':
       case 'HIVE_METASTORE':

+ 4 - 2
ambari-web/app/controllers/main/service/reassign_controller.js

@@ -288,9 +288,11 @@ App.ReassignMasterController = App.WizardController.extend({
     var databaseType = this.getDBProperty('databaseType');
     this.set('content.databaseType', databaseType);
 
-    if (this.get('content.hasCheckDBStep') && databaseType !== 'derby') {
+    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.get('content.componentsWithManualCommands').splice(2,1);
+      App.router.reassignMasterController.set('content.componentsWithManualCommands', manual);
     }
   },
 

+ 9 - 1
ambari-web/app/messages.js

@@ -1784,7 +1784,15 @@ Em.I18n.translations = {
       '</div>',
   'services.reassign.step5.body.oozie_server':
     '<div class="alert alert-info">' +
-    'Copy the contents of <b>/hadoop/oozie/data/oozie-db</b> on the source host <b>{1}</b> to <b>/hadoop/oozie/data/oozie-db</b> on the target host <b>{2}</b>.' +
+    '<ol>' +
+    '<li>On <b>{1}</b> copy the contents of' +
+    '<div class="code-snippet"><b>/hadoop/oozie/data/oozie-db</b></div></li>' +
+    '<li>To the target host <b>{2}</b></li>' +
+    '<li>If the directory doesn\'t exists you can create by running' +
+    '<div class="code-snippet">mkdir -p /hadoop/oozie/data/oozie-db</div></li>' +
+    '<li>Update directory permissions by running' +
+    '<div class="code-snippet">chown -R oozie:{5} /hadoop/oozie/data</div></li>' +
+    '</ol>' +
     '</div>',
   'services.reassign.step5.body.mysql_server':
     '<div class="alert alert-info">' +

+ 2 - 1
ambari-web/test/controllers/main/service/reassign/step4_controller_test.js

@@ -504,7 +504,8 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
       {
         componentName: 'OOZIE_SERVER',
         result: [
-          "(type=oozie-site&tag=6)"
+          "(type=oozie-site&tag=6)",
+          "(type=core-site&tag=2)"
         ]
       },
       {