diff options
author | Sage Weil <sage@inktank.com> | 2013-07-18 14:35:19 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-18 18:12:16 -0700 |
commit | a0cb40b45c4f2f921a63c2d7bb5a28572381d793 (patch) | |
tree | 4138483033a32aebb761286ddc8f41dc2ef9ea5c | |
parent | 8ee10dc4bb73bdd918873f29c70eedc3c7ef1979 (diff) | |
download | ceph-a0cb40b45c4f2f921a63c2d7bb5a28572381d793.tar.gz |
mon: decline to scrub when paxos is not active
In f1ce8d7c955a2443111bf7d9e16b4c563d445712 we close a race between scrub
and paxos commit completion on the leader. The fix is nontrivial to
backport and probably not worthwhile; just avoid scrubbing at that time
for now.
Note that the actual fix for this is in commit
f1ce8d7c955a2443111bf7d9e16b4c563d445712.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/mon/Monitor.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index af00fe3279a..8d1ff16d500 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -4006,6 +4006,18 @@ int Monitor::scrub() return -EBUSY; } + if (!paxos->is_active()) { + /* + * There is a race between scrub and paxos wherein we commit on + * the leader when we get a majority of replies from quorum but we + * commit on the peons when the round finishes. This makes a + * well-timed scrub unhappy. The fix is non-trivial and won't be + * backported. Instead, just decline to scrub during that window. + */ + clog.info() << "paxos is not active; declining to scrub right now\n"; + return -EAGAIN; + } + scrub_result.clear(); scrub_version = paxos->get_version(); |