public  synchronized BSResponse runBootStrap(SshHostInfo info) {
    BSResponse response = new BSResponse();
    /* Run some checks for ssh host */
    LOG.info("BootStrapping hosts " + info.hostListAsString());
    if (bsRunner != null) {
      response.setLog("BootStrap in Progress: Cannot Run more than one.");
      response.setStatus(BSRunStat.ERROR);

      return response;
    }
    requestId++;

    if (info.getHosts() == null || info.getHosts().isEmpty()) {
      BootStrapStatus status = new BootStrapStatus();
      status.setLog("Host list is empty.");
      status.setHostsStatus(new ArrayList<>());
      status.setStatus(BootStrapStatus.BSStat.ERROR);
      updateStatus(requestId, status);

      response.setStatus(BSRunStat.OK);
      response.setLog("Host list is empty.");
      response.setRequestId(requestId);
      return response;
    } else {
      bsRunner = new BSRunner(this, info, bootStrapDir.toString(),
          bootScript, bootSetupAgentScript, bootSetupAgentPassword, requestId, 0L,
          masterHostname, info.isVerbose(), clusterOsFamily, projectVersion, serverPort);
      bsRunner.start();
      response.setStatus(BSRunStat.OK);
      response.setLog("Running Bootstrap now.");
      response.setRequestId(requestId);
      return response;
    }
  }
update status of a request. Mostly called by the status collector thread.
@param requestId the request id.
@param status the status of the update.
ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BootStrapImpl.java