private void fixDesiredStack() throws AmbariException {
    AmbariManagementController ambariManagementController = injector.getInstance(AmbariManagementController.class);
    Clusters clusters = ambariManagementController.getClusters();
    if (clusters != null) {
      Map<String, Cluster> clusterMap = getCheckedClusterMap(clusters);
      if (clusterMap != null && !clusterMap.isEmpty()) {
        for (final Cluster cluster : clusterMap.values()) {
          StackId desiredStack = cluster.getDesiredStackVersion();
          StackId currentStack = cluster.getCurrentStackVersion();
          if (!desiredStack.equals(currentStack)) {
            cluster.setDesiredStackVersion(currentStack);
          }
        }
      }
    }
  }
if desired stack < current stack, set current stack as desired

@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog262.java