OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_22_2-15-ga9d9dd1
Gerrit Code Review
gerrit@openafs.org
Fri, 23 Feb 2018 07:26:25 -0500
The following commit has been merged in the openafs-stable-1_6_x branch:
commit a9d9dd1a329640dbcecc34b755f8c842201c1aed
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Fri Dec 15 20:21:03 2017 -0300
ubik: allow remote dbase relabel if up to date
When a site is elected the sync-site, its database is not immediately
relabeled. The database in question will be relabeled at the end of the
first write transaction (in udisk_commit). To do so, the dbase->version
is updated on the sync-site first (1) and then the versions of the
remote sites are updated through SDISK_SetVersion() (2).
In order to make sure that the remote site holds the same database as
the sync-site, the SDISK_SetVersion() function checks if the current
version held by the remote site (ubik_dbVersion) is equal to the
original version stored by the sync-site (oldversionp). If
ubik_dbVersion is not equal to oldversionp, SDISK_SetVersion() will
fail with USYNC.
However, ubik_dbVersion can be updated by the vote thread at any time.
That is, if the sync site calls VOTE_Beacon() on the remote site between
events (1) and (2), the remote site will set ubik_dbVersion to the new
version, while ubik_dbase->version is still set to the old version. As
a result, ubik_dbVersion will not be equal to oldversionp and
SDISK_SetVersion() will fail with USYNC. This failure may cause a loss
of quorum until another election is completed.
To fix this problem, let SDISK_SetVersion() relabel the database when
ubik_dbase->version is equal to oldversionp. In order to try to only
affect the scenario described above, also check if ubik_dbVersion is
equal to newversionp.
Reviewed-on: https://gerrit.openafs.org/12613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 8f46ca082653116c9c42a69e2535be1bb2f0a2a9)
Change-Id: I991d048b4c6a012c5b6fb61dc797ca3f2829b13a
Reviewed-on: https://gerrit.openafs.org/12811
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/ubik/remote.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
--
OpenAFS Master Repository