ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [2/2] ambari git commit: AMBARI-13628. Express Upgrade: Downgrade failed with server side error (dgrinenko via dlysnichenko)
Date Thu, 29 Oct 2015 19:43:11 GMT
AMBARI-13628. Express Upgrade: Downgrade failed with server side error (dgrinenko via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 8a0fddcd9e0a4e80e7425d23cfc3587481e322c6
Parents: 8c33381
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Thu Oct 29 21:41:10 2015 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Thu Oct 29 21:42:39 2015 +0200

----------------------------------------------------------------------
 .../controller/internal/UpgradeResourceProvider.java  | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8a0fddcd/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 9b6176c..59eaa10 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
@@ -681,9 +681,17 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
     // the version being upgraded or downgraded to (ie 2.2.1.0-1234)
     final String version = (String) requestMap.get(UPGRADE_VERSION);
 
-    MasterHostResolver resolver = direction.isUpgrade()
-        ? new MasterHostResolver(configHelper, cluster)
-        : new MasterHostResolver(configHelper, cluster, version);
+    MasterHostResolver resolver = null;
+    if (direction.isUpgrade()) {
+      resolver = new MasterHostResolver(configHelper, cluster);
+    } else {
+      if (upgradeType == UpgradeType.ROLLING) {
+        resolver = new MasterHostResolver(configHelper, cluster, version);
+      } else {
+        // due to EU stop components at the start of upgrade, components will never advertise
their updated versions
+        resolver = new MasterHostResolver(configHelper, cluster);
+      }
+    }
 
     StackId sourceStackId = null;
     StackId targetStackId = null;


Mime
View raw message