Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 f1c4211ad -> cba55ba2f
  refs/heads/trunk 62010bcf6 -> 9973fc0d2


AMBARI-17258. Storm service check failed after Ambari upgrade (dlysnichenko)


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

Branch: refs/heads/branch-2.4
Commit: cba55ba2f7b4881762714f2f56bed591c366ba7b
Parents: f1c4211
Author: Lisnichenko Dmitro <[email protected]>
Authored: Thu Jun 16 11:30:31 2016 +0300
Committer: Lisnichenko Dmitro <[email protected]>
Committed: Thu Jun 16 13:04:30 2016 +0300

----------------------------------------------------------------------
 .../server/upgrade/AbstractUpgradeCatalog.java  | 31 +++++++++-----------
 .../STORM/0.10.0/configuration/storm-site.xml   |  2 +-
 2 files changed, 15 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cba55ba2/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
index 04871fd..7856969 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
@@ -374,27 +374,24 @@ public abstract class AbstractUpgradeCatalog implements 
UpgradeCatalog {
           for (PropertyInfo property : properties) {
             String configType = 
ConfigHelper.fileNameToConfigType(property.getFilename());
             Config clusterConfigs = cluster.getDesiredConfigByType(configType);
-              PropertyUpgradeBehavior upgradeBehavior = 
property.getPropertyAmbariUpgradeBehavior();
+            PropertyUpgradeBehavior upgradeBehavior = 
property.getPropertyAmbariUpgradeBehavior();
 
-              if (upgradeBehavior.isAdd()) {
-                if(!toAddProperties.containsKey(configType)) {
-                  toAddProperties.put(configType, new HashSet<String>());
-                }
-                toAddProperties.get(configType).add(property.getName());
+            if (upgradeBehavior.isDelete()) {
+              if (!toRemoveProperties.containsKey(configType)) {
+                toRemoveProperties.put(configType, new HashSet<String>());
               }
-              if (upgradeBehavior.isUpdate()) {
-                if(!toUpdateProperties.containsKey(configType)) {
-                  toUpdateProperties.put(configType, new HashSet<String>());
-                }
-                toUpdateProperties.get(configType).add(property.getName());
+              toRemoveProperties.get(configType).add(property.getName());
+            } else if (upgradeBehavior.isUpdate()) {
+              if (!toUpdateProperties.containsKey(configType)) {
+                toUpdateProperties.put(configType, new HashSet<String>());
               }
-              if (upgradeBehavior.isDelete()) {
-                if(!toRemoveProperties.containsKey(configType)) {
-                  toRemoveProperties.put(configType, new HashSet<String>());
-                }
-                toRemoveProperties.get(configType).add(property.getName());
+              toUpdateProperties.get(configType).add(property.getName());
+            } else if (upgradeBehavior.isAdd()) {
+              if (!toAddProperties.containsKey(configType)) {
+                toAddProperties.put(configType, new HashSet<String>());
               }
-
+              toAddProperties.get(configType).add(property.getName());
+            }
           }
         }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cba55ba2/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-site.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-site.xml
 
b/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-site.xml
index b0f194a..17bc454 100644
--- 
a/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/STORM/0.10.0/configuration/storm-site.xml
@@ -57,6 +57,6 @@
     <name>nimbus.host</name>
     <value>localhost</value>
     <description>Deprecated config in favor of nimbus.seeds used during non HA 
mode.</description>
-    <on-ambari-upgrade delete="false"/>
+    <on-ambari-upgrade delete="true"/>
   </property>
 </configuration>

Reply via email to