Browse Source

AMBARI-1140. Resuming deploy for Installer/Add Hosts does not work if the browser is shut down during the start phase of deploy. (Arun Kandregula via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1431817 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 năm trước cách đây
mục cha
commit
516a387916

+ 4 - 0
CHANGES.txt

@@ -674,6 +674,10 @@ AMBARI-666 branch (unreleased changes)
   OPTIMIZATIONS
 
   BUG FIXES
+ 
+  AMBARI-1140. Resuming deploy for Installer/Add Hosts does not work if the
+  browser is shut down during the start phase of deploy.
+  (Arun Kandregula via yusaku)
   
   AMBARI-1120. Key spikes in HDFS IO missing from IO summary graphs.
   (Srimanth Gunturi via yusaku)

+ 7 - 0
ambari-web/app/controllers/wizard/step9_controller.js

@@ -277,6 +277,13 @@ App.WizardStep9Controller = Em.Controller.extend({
         };
 
         App.router.get(self.get('content.controllerName')).saveClusterStatus(clusterStatus);
+
+        // We need to do recovery if there is a browser crash
+        App.clusterStatus.set('value', {
+          clusterState: 'SERVICE_STARTING_3',
+          localdb: App.db.data
+        });
+
         self.startPolling();
       },
 

+ 1 - 1
ambari-web/app/models/cluster_states.js

@@ -19,7 +19,7 @@ var App = require('app');
 
 App.clusterStatus = Ember.Object.create({
   clusterName: '',
-  validStates: ['CLUSTER_NOT_CREATED_1', 'CLUSTER_DEPLOY_PREP_2', 'CLUSTER_INSTALLING_3', 'CLUSTER_INSTALLED_4', 'CLUSTER_STARTED_5', 'ADD_HOSTS_DEPLOY_PREP_2', 'ADD_HOSTS_INSTALLING_3', 'ADD_HOSTS_INSTALLED_4', 'ADD_HOSTS_COMPLETED_5'],
+  validStates: ['CLUSTER_NOT_CREATED_1', 'CLUSTER_DEPLOY_PREP_2', 'CLUSTER_INSTALLING_3', 'SERVICE_STARTING_3', 'CLUSTER_INSTALLED_4',  'CLUSTER_STARTED_5', 'ADD_HOSTS_DEPLOY_PREP_2', 'ADD_HOSTS_INSTALLING_3', 'ADD_HOSTS_INSTALLED_4', 'ADD_HOSTS_COMPLETED_5'],
   clusterState: 'CLUSTER_NOT_CREATED_1',
   wizardControllerName: null,
   localdb: null,

+ 1 - 0
ambari-web/app/routes/add_host_routes.js

@@ -56,6 +56,7 @@ module.exports = Em.Route.extend({
             App.db.data = currentClusterStatus.localdb;
             break;
           case 'ADD_HOSTS_INSTALLING_3' :
+          case 'SERVICE_STARTING_3' :
             addHostController.setCurrentStep('5');
             App.db.data = currentClusterStatus.localdb;
             break;

+ 1 - 0
ambari-web/app/routes/installer.js

@@ -45,6 +45,7 @@ module.exports = Em.Route.extend({
                   App.db.data = currentClusterStatus.localdb;
                   break;
                 case 'CLUSTER_INSTALLING_3' :
+                case 'SERVICE_STARTING_3' :
                   installerController.setCurrentStep('9');
                   App.db.data = currentClusterStatus.localdb;
                   break;