Issue with configuration of virtual servers and virtual server groups with duplicate definitions
Quentin Armitage <[email protected]> Thu, 11 Jan 2018 17:11:58 +0000
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Organization | The Armitage family |
| Message-ID | <[email protected]> |
Currently keepalived allows the same virtual server to be specified
multiple times in the configuration without reporting a configuration
error. For example:
virtual_server 10.0.0.1 80 {
protocol TCP
...
}
virtual_server 10.0.0.1 80 {
protocol TCP
...
}
This can also be configured "in disguise", where a virtual server
specification overlaps a specification in a virtual server group, for
example:
virtual_server_group GROUP1 {
10.0.0.0-20 80
...
}
virtual_server group GROUP1 {
protocol TCP
...
}
virtual_server 10.0.0.1 80 {
protocol TCP
...
}
and this can also occur if two virtual server groups overlap, or if two
virtual servers both specify the same virtual server group.
This certainly doesn't work properly; in the first place a log message
such as
IPVS (cmd 1154, errno 17): Service already exists
will be produced.
There are further problems if a virtual server has a sorry server since
when the virtual server drops below quorum causing the sorry server to
be added, the duplicate virtual server definition will continue with
its real servers, causing some traffic to be sent to real servers, and
some to the sorry server. Also, SNMP traps will not distinguish between
the two different configuration blocks of the virtual server, nor will
smtp alerts or notify_fifo messages.
On the basis that overlapping/duplicate definitions, or using the same
virtual server group twice for virtual servers using the same protocol
(TCP/UDP/SCTP) or fwmask doesn't work properly and currently produces
error messages, I propose to add a check that no virtual server group
or virtual server definitions have overlapping virtual server
definitions, and if they do to ignore the subsequent definitions.
On the basis that this would be a change to the current behaviour of
keepalived, I would be grateful if anyone for whom this would cause a
problem could respond to this message setting out what the problem
would be, and whether they would could alter their configuration to
work within the above proposals.
This change will only be made to the current beta branch, although in
due course this is expected to be merged into the master branch.
With many thanks,
Quentin Armitage
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel