vlserver: do not perform ChangeAddr on mh entries, except for removal
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 16 Dec 2014 21:13:01 +0000 (16:13 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 25 Feb 2015 17:57:34 +0000 (12:57 -0500)
commit1cc77cd43732cca1c617db329a71693903d2b699
treeb6c8db8f7963137ece5a17f5bf66e184f447d085
parent30667a5d7b86b29f9aafe2b490d89b8e01bfc541
vlserver: do not perform ChangeAddr on mh entries, except for removal

Fix a long standing bug in the ChangeAddr RPC which damages the vldb,

When vos changeaddr is run with -oldaddr and -newaddr, and the -oldaddr
is present in an multi-homed entry, instead of changing the address in
the mh entry, the server slot is "downgraded" to a single homed entry
and the mh entry is orphaned in the vldb.

Instead, if the -oldaddr is in a multi-home entry, refuse to change the
address with a VL entry not found error and log the event.

Multi-homed addresses can be changed manually using the vos setaddrs
command which calls the RegisterAddrs() RPC.

Change-Id: I20ba3e7fa5ffdb1b1abd2e2a716d8e4bb6594542
Reviewed-on: http://gerrit.openafs.org/11639
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/vlserver/vlprocs.c