Browse Source

AMBARI-1112. Add hosts fails second time around. (Srimanth Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1431797 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 years ago
parent
commit
908b27f3b2
2 changed files with 12 additions and 0 deletions
  1. 3 0
      CHANGES.txt
  2. 9 0
      ambari-web/app/routes/main.js

+ 3 - 0
CHANGES.txt

@@ -675,6 +675,9 @@ AMBARI-666 branch (unreleased changes)
 
 
   BUG FIXES
   BUG FIXES
 
 
+  AMBARI-1112. Add hosts fails second time around. (Srimanth Gunturi via
+  yusaku)
+
   AMBARI-1111. Install wizard step 9 gets stuck at 0% and other issues on
   AMBARI-1111. Install wizard step 9 gets stuck at 0% and other issues on
   page refresh. (Srimanth Gunturi via yusaku)
   page refresh. (Srimanth Gunturi via yusaku)
 
 

+ 9 - 0
ambari-web/app/routes/main.js

@@ -148,6 +148,15 @@ module.exports = Em.Route.extend({
     },
     },
 
 
     addHost:function (router) {
     addHost:function (router) {
+      if(App.clusterStatus){
+        var currentClusterStatus = App.clusterStatus.get('value');
+        if(currentClusterStatus && currentClusterStatus.clusterState=="ADD_HOSTS_COMPLETED_5"){
+          // The last time add hosts ran, it left the status
+          // in this state. We need to clear any previous status
+          // so that the hosts page starts from fresh.
+          currentClusterStatus.clusterState = 'CLUSTER_STARTED_5';
+        }
+      }
       router.transitionTo('hostAdd');
       router.transitionTo('hostAdd');
     }
     }