code: private boolean updateOnHostChange(final DeploymentGroup group,
                                       final DeploymentGroupStatus status) {
      if (status == null) {
        // We're in an unknown state. Go hog wild.
        return true;
      }
  
      if (group.getRollingUpdateReason() == null) {
        // The last rolling update didn't fail, so there's no reason to expect this one will.
        return status.getState() != FAILED;
      }
  
      if (group.getRollingUpdateReason() == HOSTS_CHANGED && status.getState() == FAILED) {
        // The last rolling update failed, but it was triggered by hosts changing. Try again.
        return true;
      }
  
      // The last rolling update didn't fail, so there's no reason to expect this one will.
      return status.getState() != FAILED;
    }
docs: Determines whether we should trigger a rolling update when deployment group hosts change.
  
  <p>We want to avoid triggering an automatic rolling update if the most recent rolling update
  was triggered manually, and failed.
  
  @param group  The deployment group that is changing hosts.
  @param status The status of the aforementioned deployment group.
  
  @return True if we should perform a rolling update.