ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-19118 - Ranger Admin Start failed while enabling NameNode HA (rzang)
Date Wed, 07 Dec 2016 23:32:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 4453782e2 -> 1cc7e63f8


AMBARI-19118 - Ranger Admin Start failed while enabling NameNode HA (rzang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1cc7e63f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1cc7e63f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1cc7e63f

Branch: refs/heads/branch-2.5
Commit: 1cc7e63f87d3a1b118cf947e0a24fba447ee4463
Parents: 4453782
Author: Richard Zang <rzang@apache.org>
Authored: Wed Dec 7 15:31:33 2016 -0800
Committer: Richard Zang <rzang@apache.org>
Committed: Wed Dec 7 15:31:33 2016 -0800

----------------------------------------------------------------------
 .../nameNode/step7_controller.js                | 14 ++++++++++++--
 .../nameNode/step9_controller.js                | 17 +++++++----------
 .../resourceManager/step4_controller.js         |  5 +++--
 .../main/service/reassign/step4_controller.js   | 20 --------------------
 .../main/service/reassign/step6_controller.js   | 19 -------------------
 ambari-web/app/messages.js                      |  7 ++++---
 .../wizard/wizardProgressPageController.js      | 20 ++++++++++++++++++++
 7 files changed, 46 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
index ae27506..9e14281 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step7_controller.js
@@ -22,14 +22,24 @@ App.HighAvailabilityWizardStep7Controller = App.HighAvailabilityProgressPageCont
 
   name:"highAvailabilityWizardStep7Controller",
 
-  commands: ['startRanger', 'startZooKeeperServers', 'startNameNode'],
+  commands: ['startZooKeeperServers', 'startAmbariInfra', 'startRanger', 'startNameNode'],
 
   initializeTasks: function () {
     this._super();
+    var tasksToRemove = [];
+
+    if (!App.Service.find().someProperty('serviceName', 'AMBARI_INFRA')) {
+      tasksToRemove.push('startAmbariInfra');
+    }
 
     if (!App.Service.find().someProperty('serviceName', 'RANGER')) {
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'startRanger').get('id'),
1);
+      tasksToRemove.push('startRanger');
     }
+    this.removeTasks(tasksToRemove);
+  },
+
+  startAmbariInfra: function () {
+    this.startServices(false, ['AMBARI_INFRA'], true);
   },
 
   startRanger: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
index 3c220c1..713e1c3 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
@@ -31,30 +31,27 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
 
   initializeTasks: function () {
     this._super();
-    var numSpliced = 0;
+    var tasksToRemove = [];
 
     // find hostname where second namenode will be installed
     this.set('secondNameNodeHost', this.get('content.masterComponentHosts').filterProperty('component',
'NAMENODE').findProperty('isInstalled', false).hostName);
 
     if (!App.Service.find().someProperty('serviceName', 'PXF') || this.isPxfComponentInstalled())
{
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'installPXF').get('id'),
1);
-      numSpliced = 1;
+      tasksToRemove.push('installPXF');
     }
     if (!App.Service.find().someProperty('serviceName', 'RANGER')) {
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureRanger').get('id')
- numSpliced, 1);
-      numSpliced++;
+      tasksToRemove.push('reconfigureRanger');
     }
     if (!App.Service.find().someProperty('serviceName', 'HBASE')) {
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHBase').get('id')
- numSpliced, 1);
-      numSpliced++;
+      tasksToRemove.push('reconfigureHBase');
     }
     if (!App.Service.find().someProperty('serviceName', 'ACCUMULO')) {
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureAccumulo').get('id')
- numSpliced, 1);
-      numSpliced++ ;
+      tasksToRemove.push('reconfigureAccumulo');
     }
     if (!App.Service.find().someProperty('serviceName', 'HAWQ')) {
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHawq').get('id')
- numSpliced, 1);
+      tasksToRemove.push('reconfigureHawq');
     }
+    this.removeTasks(tasksToRemove);
   },
 
   startSecondNameNode: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
index 722ae94..0495be9 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/resourceManager/step4_controller.js
@@ -32,10 +32,11 @@ App.RMHighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageCo
 
   initializeTasks: function () {
     this._super();
-    var numSpliced = 0;
+    var tasksToRemove = [];
     if (!App.Service.find().someProperty('serviceName', 'HAWQ')) {
-      this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHAWQ').get('id'),
1);
+      tasksToRemove.push('reconfigureHAWQ');
     }
+    this.removeTasks(tasksToRemove);
   },
 
   stopRequiredServices: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/controllers/main/service/reassign/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
index 64c2a8e..da7d2d9 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -406,26 +406,6 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
   },
 
   /**
-   * remove tasks by command name
-   */
-  removeTasks: function(commands) {
-    var tasks = this.get('tasks');
-
-    commands.forEach(function(command) {
-      var cmd = tasks.filterProperty('command', command);
-      var index = null;
-
-      if (cmd.length === 0) {
-        return false;
-      } else {
-        index = tasks.indexOf( cmd[0] );
-      }
-
-      tasks.splice( index, 1 );
-    });
-  },
-
-  /**
    * initialize tasks
    */
   initializeTasks: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/controllers/main/service/reassign/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step6_controller.js b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
index 113686b..80f1bf6 100644
--- a/ambari-web/app/controllers/main/service/reassign/step6_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
@@ -99,25 +99,6 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
     }
   },
 
-  /**
-   * remove tasks by command name
-   */
-  removeTasks: function(commands) {
-    var tasks = this.get('tasks');
-
-    commands.forEach(function(command) {
-      var index;
-      tasks.forEach(function(_task, _index) {
-        if (_task.get('command') === command) {
-          index = _index;
-        }
-      });
-      if (!Em.isNone(index)) {
-        tasks.splice(index, 1);
-      }
-    }, this);
-  },
-
   hideRollbackButton: function () {
     var failedTask = this.get('tasks').findProperty('showRollback');
     if (failedTask) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 736d393..945acfb 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1404,9 +1404,10 @@ Em.I18n.translations = {
   'admin.highAvailability.wizard.step5.task4.title':'Start JournalNodes',
   'admin.highAvailability.wizard.step5.task5.title':'Disable Secondary NameNode',
 
-  'admin.highAvailability.wizard.step7.task0.title':'Start Ranger',
-  'admin.highAvailability.wizard.step7.task1.title':'Start ZooKeeper Servers',
-  'admin.highAvailability.wizard.step7.task2.title':'Start NameNode',
+  'admin.highAvailability.wizard.step7.task0.title':'Start ZooKeeper Servers',
+  'admin.highAvailability.wizard.step7.task1.title':'Start Ambari Infra',
+  'admin.highAvailability.wizard.step7.task2.title':'Start Ranger',
+  'admin.highAvailability.wizard.step7.task3.title':'Start NameNode',
 
   'admin.highAvailability.wizard.step9.task0.title':'Start Additional NameNode',
   'admin.highAvailability.wizard.step9.task1.title':'Install Failover Controllers',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1cc7e63f/ambari-web/app/mixins/wizard/wizardProgressPageController.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index 3ee8a9a..d426eda 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -272,6 +272,26 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent,
{
     }
   },
 
+  /**
+   * remove tasks by command name
+   */
+  removeTasks: function(commands) {
+    var tasks = this.get('tasks');
+
+    commands.forEach(function(command) {
+      var cmd = tasks.filterProperty('command', command);
+      var index = null;
+
+      if (cmd.length === 0) {
+        return false;
+      } else {
+        index = tasks.indexOf( cmd[0] );
+      }
+
+      tasks.splice( index, 1 );
+    });
+  },
+
   setTaskStatus: function (taskId, status) {
     this.get('tasks').findProperty('id', taskId).set('status', status);
   },


Mime
View raw message