ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject ambari git commit: AMBARI-21449. Stack upgrade with pre-req checks enabled fails due to NPE
Date Wed, 12 Jul 2017 18:21:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21348 b000119b6 -> d85292828


AMBARI-21449. Stack upgrade with pre-req checks enabled fails due to NPE


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

Branch: refs/heads/branch-feature-AMBARI-21348
Commit: d8529282845d1980c4fd39ad83055cb96eddf79e
Parents: b000119
Author: Attila Doroszlai <adoroszlai@hortonworks.com>
Authored: Wed Jul 12 15:00:12 2017 +0200
Committer: Attila Doroszlai <adoroszlai@hortonworks.com>
Committed: Wed Jul 12 20:19:19 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/controller/internal/UpgradeResourceProvider.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d8529282/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 1130026..d09551a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -2097,6 +2097,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
       Direction direction = upgradeContext.getDirection();
       Map<String, Object> requestMap = upgradeContext.getUpgradeRequest();
       UpgradeType upgradeType = upgradeContext.getType();
+      String stackId = upgradeContext.getTargetStackId().getStackId();
 
       String version = (String) requestMap.get(UPGRADE_REPO_VERSION);
       boolean skipPrereqChecks = Boolean.parseBoolean((String) requestMap.get(UPGRADE_SKIP_PREREQUISITE_CHECKS));
@@ -2125,6 +2126,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
           PreUpgradeCheckResourceProvider.UPGRADE_CHECK_CLUSTER_NAME_PROPERTY_ID).equals(cluster.getClusterName()).and().property(
           PreUpgradeCheckResourceProvider.UPGRADE_CHECK_REPOSITORY_VERSION_PROPERTY_ID).equals(version).and().property(
           PreUpgradeCheckResourceProvider.UPGRADE_CHECK_UPGRADE_TYPE_PROPERTY_ID).equals(upgradeType).and().property(
+          PreUpgradeCheckResourceProvider.UPGRADE_CHECK_TARGET_STACK_ID).equals(stackId).and().property(
           PreUpgradeCheckResourceProvider.UPGRADE_CHECK_UPGRADE_PACK_PROPERTY_ID).equals(preferredUpgradePack).toPredicate();
 
       Request preUpgradeCheckRequest = PropertyHelper.getReadRequest();


Mime
View raw message