ubik: death to SVOTE_GetSyncSite 43/14043/10
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Thu, 27 Feb 2020 22:28:14 +0000 (22:28 +0000)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 24 Mar 2020 05:18:50 +0000 (01:18 -0400)
commit8c335182115a1e16c66cde40c08ce9fd0144dccb
tree50892fdc674cc57e6e12539d591a891d00892efd
parentd369f4e5c9f975d370ee1aa7546fe9da80e1e118
ubik: death to SVOTE_GetSyncSite

The SVOTE_GetSyncSite RPC was intended to provide the IP address of the
current sync-site. Unfortunately, the RPC-L incorrectly defined ahost as
an input argument instead of an output argument. As a result, the IP
address in question is not returned to the callers of SVOTE_GetSyncSite.
Moreover, calls to this RPC must be made through connections associated
with the VOTE_SERVICE_ID. Sadly, the ubik_Call* functions call
SVOTE_GetSyncSite using connections associated with the USER_SERVICE_ID.
Consequently, the server getting this request returns RXGEN_OPCODE,
meaning that this RPC is not implemented by the service in question.

Since RPC arguments cannot be changed without causing compatibility
issues between different client / server versions and the RPC in
question is being called through the wrong service id, remove
SVOTE_GetSyncSite and its callers. Considering that in all versions of
OpenAFS calls to this RPC always return RXGEN_OPCODE, no behavior
change is introduced by this commit.

Also, remove the "chaseCount logic" from the ubik_Call* functions.
This logic prevents the loop counter from being moved backwards
indefinitely, resulting in an infinite loop. Fortunately, without the
VOTE_GetSyncSite() calls this counter cannot be moved backwards more
than once.

Change-Id: Idd071583e8f67109e003f7a5675de02a235e5809
Reviewed-on: https://gerrit.openafs.org/14043
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/bucoord/ubik_db_if.c
src/libafsauthent/afsauthent.def
src/ubik/liboafs_ubik.la.sym
src/ubik/ubik_int.xg
src/ubik/ubikclient.c
src/ubik/vote.c