Skip to content

Commit

Permalink
ipvs: failed RS was flapping on config reload
Browse files Browse the repository at this point in the history
The RS disabled by health-checker was turned on w/o health-checking
by SIGHUP handler in the init_service_rs() subroutine.
This did not happen with alpha mode set.

The issue was reported by Luis Fernando Cornachioni Estrozi
in the keepalived-devel@ list.
  • Loading branch information
andriyanov committed Nov 13, 2014
1 parent 8a835e7 commit 7bf6fca
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions keepalived/check/ipwrapper.c
Expand Up @@ -157,22 +157,23 @@ init_service_rs(virtual_server_t * vs)

for (e = LIST_HEAD(vs->rs); e; ELEMENT_NEXT(e)) {
rs = ELEMENT_DATA(e);
/* Do not re-add failed RS instantly on reload */
if (rs->reloaded) {
/* force re-adding of the rs into vs_group:
* we may have new vsg entries */
if (vs->vsgname)
UNSET_ALIVE(rs);
continue;
}
/* In alpha mode, be pessimistic (or realistic?) and don't
* add real servers into the VS pool. They will get there
* later upon healthchecks recovery (if ever).
*/
if (vs->alpha) {
if (! rs->reloaded)
UNSET_ALIVE(rs);
UNSET_ALIVE(rs);
continue;
}
if (!ISALIVE(rs)) {
if (!ipvs_cmd(LVS_CMD_ADD_DEST, check_data->vs_group, vs, rs))
return 0;
else
SET_ALIVE(rs);
} else if (vs->vsgname) {
UNSET_ALIVE(rs);
if (!ipvs_cmd(LVS_CMD_ADD_DEST, check_data->vs_group, vs, rs))
return 0;
SET_ALIVE(rs);
Expand Down

0 comments on commit 7bf6fca

Please sign in to comment.