Skip to content

Commit

Permalink
Merge pull request #739 from pqarmitage/beta
Browse files Browse the repository at this point in the history
For virtual servers, ensure quorum <= number of real servers
  • Loading branch information
pqarmitage committed Jan 4, 2018
2 parents 53eb0d0 + 9550015 commit 55b4b25
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions keepalived/check/check_data.c
Expand Up @@ -660,6 +660,13 @@ bool validate_check_config(void)
continue;
}

/* Check that the quorum isn't higher than the number of real servers,
* otherwise we will never be able to come up. */
if (vs->quorum > LIST_SIZE(vs->rs)) {
log_message(LOG_INFO, "Warning - quorum %1$d for %2$s exceeds number of real servers %3$d, reducing quorum to %3$d", vs->quorum, FMT_VS(vs), LIST_SIZE(vs->rs));
vs->quorum = LIST_SIZE(vs->rs);
}

/* Ensure that no virtual server hysteresis >= quorum */
if (vs->hysteresis >= vs->quorum) {
log_message(LOG_INFO, "Virtual server %s: hysteresis %u >= quorum %u; setting hysteresis to %u",
Expand Down

0 comments on commit 55b4b25

Please sign in to comment.