[lvs-users] Issue with order of servers returned by net-snmp-lvs-module

Robin Bowes robin-lists at robinbowes.com
Thu Oct 1 16:46:44 BST 2009


Having got net-snmp-lvs-module back on the radar, I'm hitting an issue
with it.

Specifically, the order in which real servers are returned seems to be

For example, I created a VIP with three real servers. snmpwalk returned
them as:

. = IpAddress:
. = IpAddress:
. = IpAddress:

ie. they're in reverse order.

[I then added another service, and removed it again, but didn't check
the server order for the first service. I may also have removed the
server .208 and re-added it, I don't recall. I'm mentioning this as it
might explain why the order of servers .208, .209, & .210 changes in the
following listing rather than just being shuffled down a step.]

I then added another server to the initial service. I now had:

. = IpAddress:
. = IpAddress:
. = IpAddress:
. = IpAddress:

ie. all the indexes have changed.

I then added another server:

LVS-MIB::lvsRealServerAddr.1.1 = IpAddress:
LVS-MIB::lvsRealServerAddr.1.2 = IpAddress:
LVS-MIB::lvsRealServerAddr.1.3 = IpAddress:
LVS-MIB::lvsRealServerAddr.1.4 = IpAddress:
LVS-MIB::lvsRealServerAddr.1.5 = IpAddress:

So, all the indexes have changed again.

I presume this issue will also hit the list of services, ie. when I add
a new service it will be returned at index 1 and the service that is
currently at index 1 will become index 2. This will break my monitoring
since I am explicitly specifying the service index "1" for my real
server monitoring.

Ideally, I'd like so the index for each service + real server remains
static. For example, if I have three servers, indexed 1-3, and add
another one, it should be indexed at 4. If I then remove the server
indexed at 1, the index shouldn't change for the other servers, ie. they
should stay at 2,3, & 4.

I realise this is likely to be not an easy task, so I'd settle for
having the servers added in the correct order, eg. if I have three
servers, indexed 1-3, and add another one, it should be indexed at 4.

Sadly, I don't know enough about C to even begin to try and work out how
to fix this. Anyone else fancy a go?


More information about the lvs-users mailing list