[lvs-users] Issue with order of servers returned by net-snmp-lvs-module
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
Specifically, the order in which real servers are returned seems to be
For example, I created a VIP with three real servers. snmpwalk returned
.22.214.171.124.4.1.8225.47126.96.36.199.1.1 = IpAddress: 192.168.253.210
.188.8.131.52.4.1.8225.47184.108.40.206.1.2 = IpAddress: 192.168.253.209
.220.127.116.11.4.1.8225.4718.104.22.168.1.3 = IpAddress: 192.168.253.208
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:
.22.214.171.124.4.1.8225.47126.96.36.199.1.1 = IpAddress: 192.168.253.213
.188.8.131.52.4.1.8225.47184.108.40.206.1.2 = IpAddress: 192.168.253.208
.220.127.116.11.4.1.8225.4718.104.22.168.1.3 = IpAddress: 192.168.253.210
.22.214.171.124.4.1.8225.47126.96.36.199.1.4 = IpAddress: 192.168.253.209
ie. all the indexes have changed.
I then added another server:
LVS-MIB::lvsRealServerAddr.1.1 = IpAddress: 192.168.253.214
LVS-MIB::lvsRealServerAddr.1.2 = IpAddress: 192.168.253.213
LVS-MIB::lvsRealServerAddr.1.3 = IpAddress: 192.168.253.208
LVS-MIB::lvsRealServerAddr.1.4 = IpAddress: 192.168.253.210
LVS-MIB::lvsRealServerAddr.1.5 = IpAddress: 192.168.253.209
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
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