You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2017/03/09 15:12:12 UTC
ambari git commit: AMBARI-20376. While Moving Namenode via Move
Master wizard, datanodes reported as down (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 47f924334 -> 221ad2830
AMBARI-20376. While Moving Namenode via Move Master wizard, datanodes reported as down (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/221ad283
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/221ad283
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/221ad283
Branch: refs/heads/branch-2.5
Commit: 221ad2830f1ce3f82508ac92a226f8d4b784fd5c
Parents: 47f9243
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Mar 9 14:32:10 2017 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Mar 9 17:12:07 2017 +0200
----------------------------------------------------------------------
.../controllers/main/service/reassign/step6_controller.js | 9 +++++++++
ambari-web/app/messages.js | 1 +
.../app/mixins/wizard/wizardProgressPageController.js | 6 +++---
3 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/221ad283/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 80f1bf6..05494d4 100644
--- a/ambari-web/app/controllers/main/service/reassign/step6_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
@@ -27,6 +27,7 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
'putHostComponentsInMaintenanceMode',
'stopHostComponentsInMaintenanceMode',
'deleteHostComponents',
+ 'startDatanodes',
'startAllServices'
],
@@ -97,6 +98,9 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
} else {
this.removeTasks(['stopHostComponentsInMaintenanceMode']);
}
+ if (!(this.get('content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled'))) {
+ this.removeTasks(['startDatanodes']);
+ }
},
hideRollbackButton: function () {
@@ -200,5 +204,10 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
success: 'startPolling',
error: 'onTaskError'
});
+ },
+
+ startDatanodes: function () {
+ this.updateComponent('DATANODE', null, 'HDFS', 'Start');
}
+
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/221ad283/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 83cc85c..20f7757 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2396,6 +2396,7 @@ Em.I18n.translations = {
'services.reassign.step6.tasks.installPxf.title': 'Install PXF on NameNode',
'services.reassign.step6.tasks.stopMysqlService.title': 'Stop Mysql Server',
'services.reassign.step6.tasks.stopHostComponentsInMaintenanceMode.title': 'Stop {0}',
+ 'services.reassign.step6.tasks.startDatanodes.title': 'Start DataNodes',
'services.reassign.step6.status.success': 'Successfully moved <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host.',
'services.reassign.step6.status.failed': 'Failed to move <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host.',
'services.reassign.step6.status.info': 'Reassigning {0}. \nPlease wait for all tasks to be completed.',
http://git-wip-us.apache.org/repos/asf/ambari/blob/221ad283/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 ced5591..9d9d000 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -604,14 +604,14 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
* Update component status on selected hosts.
*
* @param {string} componentName
- * @param {(string|string[])} hostName
+ * @param {(string|string[]|null)} hostName - use null to update components on all hosts
* @param {string} serviceName
* @param {string} context
* @param {number} taskNum
* @returns {$.ajax}
*/
updateComponent: function (componentName, hostName, serviceName, context, taskNum) {
- if (!(hostName instanceof Array)) {
+ if (hostName && !(hostName instanceof Array)) {
hostName = [hostName];
}
var state = context.toLowerCase() == "start" ? "STARTED" : "INSTALLED";
@@ -622,7 +622,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create(App.InstallComponent, {
HostRoles: {
state: state
},
- query: 'HostRoles/component_name=' + componentName + '&HostRoles/host_name.in(' + hostName.join(',') + ')&HostRoles/maintenance_state=OFF',
+ query: 'HostRoles/component_name=' + componentName + (hostName ? '&HostRoles/host_name.in(' + hostName.join(',') + ')' : '') + '&HostRoles/maintenance_state=OFF',
context: context + " " + App.format.role(componentName, false),
hostName: hostName,
taskNum: taskNum || 1,