void markHostRequestFailed(HostRoleStatus status, Throwable cause, PersistedState persistedState) {
    String errorMessage = StringUtils.substringBefore(Throwables.getRootCause(cause).getMessage(), "\n");
    LOG.info("HostRequest: marking host request {} for {} as {} due to {}", id, hostname, status, errorMessage);
    abortPendingTasks();
    setStatus(status);
    setStatusMessage(errorMessage);
    persistedState.setHostRequestStatus(id, status, errorMessage);
  }
Only to be used when replaying persisted requests upon server startup.

@param requestId    logical request id
@param id           host request id
@param predicate    host predicate
@param topology     cluster topology
@param entity       host request entity
ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java