|
@@ -22,7 +22,7 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
|
|
|
|
|
|
name: "reassignMasterWizardStep6Controller",
|
|
|
|
|
|
- commands: ['stopMysqlService', 'putHostComponentsInMaintenanceMode', 'deleteHostComponents', 'startAllServices'],
|
|
|
+ commands: ['stopMysqlService', 'putHostComponentsInMaintenanceMode', 'stopHostComponentsInMaintenanceMode', 'deleteHostComponents', 'startAllServices'],
|
|
|
|
|
|
clusterDeployState: 'REASSIGN_MASTER_INSTALLING',
|
|
|
|
|
@@ -72,6 +72,9 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
|
|
|
if ( this.get('content.reassign.component_name') !== 'MYSQL_SERVER' ) {
|
|
|
this.removeTasks(['putHostComponentsInMaintenanceMode', 'stopMysqlService']);
|
|
|
}
|
|
|
+ if (!this.get('content.reassignComponentsInMM.length')) {
|
|
|
+ this.removeTasks(['stopHostComponentsInMaintenanceMode']);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -101,8 +104,8 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
|
|
|
}.observes('tasks.@each.showRollback'),
|
|
|
|
|
|
onComponentsTasksSuccess: function () {
|
|
|
- this.set('multiTaskCounter', this.get('multiTaskCounter') + 1);
|
|
|
- if (this.get('multiTaskCounter') >= this.get('hostComponents').length) {
|
|
|
+ this.decrementProperty('multiTaskCounter');
|
|
|
+ if (this.get('multiTaskCounter') <= 0) {
|
|
|
this.onTaskCompleted();
|
|
|
}
|
|
|
},
|
|
@@ -112,9 +115,9 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
|
|
|
},
|
|
|
|
|
|
deleteHostComponents: function () {
|
|
|
- this.set('multiTaskCounter', 0);
|
|
|
var hostComponents = this.get('hostComponents');
|
|
|
var hostName = this.get('content.reassignHosts.source');
|
|
|
+ this.set('multiTaskCounter', hostComponents.length);
|
|
|
for (var i = 0; i < hostComponents.length; i++) {
|
|
|
App.ajax.send({
|
|
|
name: 'common.delete.host_component',
|
|
@@ -138,9 +141,9 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
|
|
|
},
|
|
|
|
|
|
putHostComponentsInMaintenanceMode: function () {
|
|
|
- this.set('multiTaskCounter', 0);
|
|
|
var hostComponents = this.get('hostComponents');
|
|
|
var hostName = this.get('content.reassignHosts.source');
|
|
|
+ this.set('multiTaskCounter', hostComponents.length);
|
|
|
for (var i = 0; i < hostComponents.length; i++) {
|
|
|
App.ajax.send({
|
|
|
name: 'common.host.host_component.passive',
|
|
@@ -156,6 +159,21 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ stopHostComponentsInMaintenanceMode: function () {
|
|
|
+ var hostComponentsInMM = this.get('content.reassignComponentsInMM');
|
|
|
+ var hostName = this.get('content.reassignHosts.source');
|
|
|
+ var serviceName = this.get('content.reassign.service_id');
|
|
|
+ hostComponentsInMM = hostComponentsInMM.map(function(componentName){
|
|
|
+ return {
|
|
|
+ hostName: hostName,
|
|
|
+ serviceName: serviceName,
|
|
|
+ componentName: componentName
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.set('multiTaskCounter', hostComponentsInMM.length);
|
|
|
+ this.updateComponentsState(hostComponentsInMM, 'INSTALLED');
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* make server call to stop services
|
|
|
*/
|