[OpenAFS-devel] diagnosing my problem with ubik elections... bug in ubik
Neulinger, Nathan
nneul@umr.edu
Tue, 3 Apr 2001 11:52:17 -0500
I did find one bug in ubik code... this isn't the complete solution to my
problem, but I figured I'd send this to fix if I'm not confused. This bug
explains the weird symptoms I was seeing with the hosts not getting the
correct lowestHost.
in vote.c around line 208:
if (!amIClone &&
(ntohl((afs_uint32) ubik_host) <= ntohl((afs_uint32) lowestHost)
|| lowestTime + BIGTIME < now)) {
lowestTime = now;
lowestHost = ubik_host[0];
}
the comparison is wrong... should be:
(ntohl((afs_uint32) ubik_host[0]) <= ntohl((afs_uint32) lowestHost)
As it is, you're comparing the ntohl of a pointer to lowestHost, so it's
always updating lowest_host to be ubik_host[0]. (itself)
Once I changed that, the lowestHost calculation is looking much better.
Still not syncing up cause no one is ever sending a yes vote, but I'm still
looking at that.
-- Nathan
------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216