/* Set a virtualserver IPVS rules */ static int init_service_vs(virtual_server_t * vs) { /* Init the VS root */ if (!ISALIVE(vs) || vs->vsgname) { if (!ipvs_cmd(LVS_CMD_ADD, vs, NULL)) return 0; else SET_ALIVE(vs); } /* Processing real server queue */ if (!init_service_rs(vs)) return 0; if (vs->reloaded) { if (vs->vsgname) /* add reloaded dests into new vsg entries */ sync_service_vsg(vs); /* we may have got/lost quorum due to quorum setting changed */ update_quorum_state(vs); } return 1; }
/* Set a virtualserver IPVS rules */ static int init_service_vs(virtual_server_t * vs) { /* Init the VS root */ if (!ISALIVE(vs) || vs->vsgname) { if (!ipvs_cmd(LVS_CMD_ADD, check_data->vs_group, vs, NULL)) return 0; else SET_ALIVE(vs); } /* Processing real server queue */ if (!LIST_ISEMPTY(vs->rs)) { if (vs->alpha && ! vs->reloaded) vs->quorum_state = DOWN; if (!init_service_rs(vs)) return 0; } /* if the service was reloaded, we may have got/lost quorum due to quorum setting changed */ if (vs->reloaded) update_quorum_state(vs); return 1; }
/* Set a virtualserver IPVS rules */ static int init_service_vs(virtual_server * vs) { /* Init the VS root */ if (!ISALIVE(vs) || vs->vsgname) { if (!ipvs_cmd(LVS_CMD_ADD, check_data->vs_group, vs, NULL)) return 0; else SET_ALIVE(vs); } /* Processing real server queue */ if (!LIST_ISEMPTY(vs->rs)) { if (vs->alpha) vs->quorum_state = DOWN; if (!init_service_rs(vs)) return 0; } return 1; }