if (requiresVersionUpdate) {
LOG.info("Upgrade cluster request received for stack " + requestedVersion);
boolean retry = false;
if (0 == currentVersion.compareTo(desiredVersion)) {
if (1 != requestedVersion.compareTo(currentVersion)) {
throw new AmbariException("Target version : " + requestedVersion
+ " must be greater than current version : " + currentVersion);
} else {
StackInfo stackInfo =
ambariMetaInfo.getStackInfo(requestedVersion.getStackName(), requestedVersion.getStackVersion());