public Optional<String> getFailureReason() {
    for (HostRequest request : getHostRequests()) {
      Optional<String> failureReason = request.getStatusMessage();
      if (failureReason.isPresent()) {
        return failureReason;
      }
    }
    return Optional.absent();
  }
Returns if all the tasks in the logical request have completed state.
ambari-server/src/main/java/org/apache/ambari/server/topology/LogicalRequest.java