ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-21626 - Configs For Target Stack Are Not Created During Upgrade (jonathanhurley)
Date Wed, 02 Aug 2017 15:42:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 97ccf3bff -> ea57a6bab


AMBARI-21626 - Configs For Target Stack Are Not Created During Upgrade (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: ea57a6bab346eb18eeb538bd86ac580ff7f07afc
Parents: 97ccf3b
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Tue Aug 1 20:16:21 2017 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Wed Aug 2 11:41:55 2017 -0400

----------------------------------------------------------------------
 .../org/apache/ambari/server/state/ConfigHelper.java  | 14 ++++++--------
 .../org/apache/ambari/server/state/UpgradeHelper.java |  2 +-
 .../server/state/stack/upgrade/ClusterGrouping.java   |  2 +-
 .../stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml |  2 +-
 4 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ea57a6ba/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 5ac4c8f..6b82273 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -1242,10 +1242,9 @@ public class ConfigHelper {
       if (!defaultPropertiesByType.containsKey(type)) {
         defaultPropertiesByType.put(type, new HashMap<String, String>());
       }
-      if (stackDefaultProperty.getPropertyStackUpgradeBehavior().isMerge()) {
-        defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
-            stackDefaultProperty.getValue());
-      }
+
+      defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
+          stackDefaultProperty.getValue());
     }
 
     // for every installed service, populate the default service properties
@@ -1259,10 +1258,9 @@ public class ConfigHelper {
       if (!defaultPropertiesByType.containsKey(type)) {
         defaultPropertiesByType.put(type, new HashMap<String, String>());
       }
-      if (serviceDefaultProperty.getPropertyStackUpgradeBehavior().isMerge()) {
-        defaultPropertiesByType.get(type).put(serviceDefaultProperty.getName(),
-            serviceDefaultProperty.getValue());
-      }
+
+      defaultPropertiesByType.get(type).put(serviceDefaultProperty.getName(),
+          serviceDefaultProperty.getValue());
     }
 
     return defaultPropertiesByType;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ea57a6ba/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
index a5b40ff..7ed70de 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
@@ -892,7 +892,7 @@ public class UpgradeHelper {
       // downgrade is easy - just remove the new and make the old current
       if (direction == Direction.DOWNGRADE) {
         cluster.applyLatestConfigurations(targetStackId, serviceName);
-        return;
+        continue;
       }
 
       // upgrade is a bit harder - we have to merge new stack configurations in

http://git-wip-us.apache.org/repos/asf/ambari/blob/ea57a6ba/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
index fa988c3..3deb7c8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ClusterGrouping.java
@@ -387,4 +387,4 @@ public class ClusterGrouping extends Grouping {
       }
     }
   }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/ea57a6ba/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
index b7027c5..ef8ce70 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
+++ b/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml
@@ -239,4 +239,4 @@
       </component>
     </service>
   </processing>
-</upgrade>
+</upgrade>
\ No newline at end of file


Mime
View raw message