private boolean isValidStateTransition(RequestStageContainer stages, State startState,
                                         State desiredState, ServiceComponentHost host) {
    //todo: After separating install and start, the install stage is no longer included in the passed in request stage container
    //todo: so we need to re-evaluate this getting projected state from topology manager
    return true;
//    if (stages != null) {
//      State projectedState = stages.getProjectedState(host.getHostName(), host.getServiceComponentName());
//      startState = projectedState == null ? startState : projectedState;
//    }
//
//    return State.isValidStateTransition(startState, desiredState);
  }
Determine whether a host component state change is valid.
Looks at projected state from the current stages associated with the request.


@param stages        request stages
@param startState    host component start state
@param desiredState  host component desired state
@param host          host where state change is occurring

@return whether the state transition is valid
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java