ubik: Do not count votes from error'd connections

If the given connection has a connection-wide error on it, the vote we
got from that site is probably not valid, and we could easily be
interpreting an error code as a vote time. So instead, treat the host
as if we got a network error from it.

Reviewed-on: http://gerrit.openafs.org/8487
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 23092acce5d2d71a5ad6402119973c7c2c2f5e89)

Change-Id: Id320b33bb6662d7867ae1f4a8d0a29808f16b59d
Reviewed-on: http://gerrit.openafs.org/8947
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
Andrew Deason 2012-11-20 15:00:15 -06:00 committed by Stephan Wiesand
parent a369628d2c
commit 1243f1c034

View File

@ -443,6 +443,12 @@ ubeacon_Interact(void *dummy)
(int)code, afs_inet_ntoa_r(ts->addr[0], hoststr));
code = -1;
}
if (code > 0 && rx_ConnError(connections[multi_i])) {
ubik_print("assuming vote from %s is invalid due to conn error %d; marking host down\n",
afs_inet_ntoa_r(ts->addr[0], hoststr),
(int)rx_ConnError(connections[multi_i]));
code = -1;
}
/* note that the vote time (the return code) represents the time
* the vote was computed, *not* the time the vote expires. We compute