]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
ubik: Do not count votes from error'd connections
authorAndrew Deason <adeason@sinenomine.net>
Tue, 20 Nov 2012 21:00:15 +0000 (15:00 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 17 Apr 2013 12:56:22 +0000 (05:56 -0700)
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>
src/ubik/beacon.c

index 4446ccc6ca0c255172e5651c7fbd0aea8492050d..192b20670fb5db9c2227d792c1490b46652f17d8 100644 (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