Browse Source

Revert "AMBARI-25558. Upgrade fails because host is out of sync (#3227)"

This reverts commit 36e5735bfa84efe8b34e7f509e5deef2f3bddd4b.
aonishuk 5 years ago
parent
commit
271695c03b

+ 2 - 8
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java

@@ -137,14 +137,8 @@ public class HostVersionOutOfSyncListener {
               hostStackId.getStackName(), hostStackId.getStackVersion(), serviceName, componentName);
           continue;
         }
-
-        ComponentInfo component = ami.get().getService(hostStackId.getStackName(), hostStackId.getStackVersion(),
-                                                        serviceName).getComponentByName(componentName);
-
-        // Skip lookup if stack does not contain the component
-        if (component == null) {
-          continue;
-        }
+        ComponentInfo component = ami.get().getComponent(hostStackId.getStackName(),
+                hostStackId.getStackVersion(), serviceName, componentName);
 
         if (!component.isVersionAdvertised()) {
           RepositoryVersionState state = checkAllHostComponents(hostStackId, hostVersionEntity.getHostEntity());