You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/12/28 08:18:18 UTC

git commit: AMBARI-4129. HA wizard not accessible after upgrade. (yusaku)

Updated Branches:
  refs/heads/branch-1.4.3 eeb988e6f -> 0515579b9


AMBARI-4129. HA wizard not accessible after upgrade. (yusaku)


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

Branch: refs/heads/branch-1.4.3
Commit: 0515579b9eed799c3bd152d812ba21f61bba1221
Parents: eeb988e
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Fri Dec 27 23:10:08 2013 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Fri Dec 27 23:13:41 2013 -0800

----------------------------------------------------------------------
 .../app/controllers/main/admin/highAvailability_controller.js    | 1 -
 ambari-web/app/controllers/main/host/details.js                  | 1 -
 ambari-web/app/controllers/main/service.js                       | 1 -
 ambari-web/app/controllers/main/service/item.js                  | 1 -
 ambari-web/app/models/cluster_states.js                          | 4 ++++
 ambari-web/app/routes/main.js                                    | 1 -
 ambari-web/app/utils/db.js                                       | 2 +-
 7 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index 882a506..270d9c7 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -49,7 +49,6 @@ App.MainAdminHighAvailabilityController = Em.Controller.extend({
         return;
       }
     }
-    App.db.mergeStorage();
     App.router.transitionTo('enableHighAvailability');
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 21c0757..a5845c5 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -1058,7 +1058,6 @@ App.MainHostDetailsController = Em.Controller.extend({
   moveComponent: function (event) {
     App.showConfirmationPopup(function() {
       var component = event.context;
-      App.db.mergeStorage();
       var reassignMasterController = App.router.get('reassignMasterController');
       reassignMasterController.saveComponentToReassign(component);
       reassignMasterController.getSecurityStatus();

http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/controllers/main/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service.js b/ambari-web/app/controllers/main/service.js
index 81a72bd..77c9813 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -157,7 +157,6 @@ App.MainServiceController = Em.ArrayController.extend({
     if (this.get('isAllServicesInstalled')) {
       return;
     }
-    App.db.mergeStorage();
     App.router.transitionTo('main.serviceAdd');
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 4841bb0..325e738 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -220,7 +220,6 @@ App.MainServiceItemController = Em.Controller.extend({
   reassignMaster: function (hostComponent) {
     var component = App.HostComponent.find().findProperty('componentName', hostComponent);
     console.log('In Reassign Master', hostComponent);
-    App.db.mergeStorage();
     var reassignMasterController = App.router.get('reassignMasterController');
     reassignMasterController.saveComponentToReassign(component);
     reassignMasterController.getSecurityStatus();

http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/models/cluster_states.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/cluster_states.js b/ambari-web/app/models/cluster_states.js
index 420745a..5f1dc37 100644
--- a/ambari-web/app/models/cluster_states.js
+++ b/ambari-web/app/models/cluster_states.js
@@ -95,6 +95,10 @@ App.clusterStatus = Ember.Object.create({
           } else {
             // default status already set
           }
+          // this is to ensure that the local storage namespaces are initialized with all expected namespaces.
+          // after upgrading ambari, loading local storage data from the "persist" data saved via an older version of
+          // Ambari can result in missing namespaces that are defined in the new version of Ambari.
+          App.db.mergeStorage();
         },
         error: function (xhr) {
           if (xhr.status == 404) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index b0763aa..85674dc 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -686,7 +686,6 @@ module.exports = Em.Route.extend({
       }),
 
       addSecurity: function (router, object) {
-        App.db.mergeStorage();
         router.get('mainAdminSecurityController').setAddSecurityWizardStatus('RUNNING');
         router.transitionTo('adminAddSecurity');
       },

http://git-wip-us.apache.org/repos/asf/ambari/blob/0515579b/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index 5c08160..748ddd2 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -93,7 +93,7 @@ App.db.mergeStorage = function() {
     console.log('doing a cleanup');
     App.db.cleanUp();
   } else {
-    App.db.data = $.extend(true,{}, InitialData, App.db.data);
+    localStorage.setObject('ambari', $.extend(true,{}, InitialData, App.db.data));
   }
 };