public List<UpgradeCheckResult> performChecks(UpgradeCheckRequest request,
                                               List<UpgradeCheck> upgradeChecks, Configuration config) {

    final String clusterName = request.getClusterName();
    final List<UpgradeCheckResult> results = new ArrayList<>();
    final boolean canBypassPreChecks = config.isUpgradePrecheckBypass();

    List<UpgradeCheck> applicablePreChecks = getApplicableChecks(request, upgradeChecks);

    for (UpgradeCheck check : applicablePreChecks) {
      UpgradeCheckResult result = new UpgradeCheckResult(check);
      try {
        result = check.perform(request);
      } catch (ClusterNotFoundException ex) {
        result.setFailReason("Cluster with name " + clusterName + " doesn't exists");
        result.setStatus(UpgradeCheckStatus.FAIL);
      } catch (Exception ex) {
        LOG.error("Check " + check.getCheckDescription().name() + " failed", ex);
        result.setFailReason("Unexpected server error happened");
        result.setStatus(UpgradeCheckStatus.FAIL);
      }

      if (result.getStatus() == UpgradeCheckStatus.FAIL && canBypassPreChecks) {
        LOG.error("Check {} failed but stack upgrade is allowed to bypass failures. Error to bypass: {}. Failed on: {}",
          check.getCheckDescription().name(),
          result.getFailReason(),
          StringUtils.join(result.getFailedOn(), ", "));
        result.setStatus(UpgradeCheckStatus.BYPASS);
      }

      results.add(result);
      request.addResult(check.getCheckDescription(), result.getStatus());
    }

    return results;
  }
Executes all registered pre-requisite checks.

@param request
         pre-requisite check request
@return list of pre-requisite check results
ambari-server/src/main/java/org/apache/ambari/server/state/CheckHelper.java