]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/PrimaryLogPG: fix on_local_recover crash on stray clone
authorSage Weil <sage@redhat.com>
Mon, 4 Jun 2018 17:51:11 +0000 (12:51 -0500)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Jul 2018 11:23:27 +0000 (13:23 +0200)
commit2feb1127c9d9b8175a79f80e00b85c2e8460c862
tree092da590d6f335de0e02fef3497eb7bfe95e5ed2
parent42b994e4bb65b0102e1a5da8df0bad21233f93cb
osd/PrimaryLogPG: fix on_local_recover crash on stray clone

If there is a stray clone (one that does not appear in the SnapSet) and
we do any sort of recovery on it the OSD will crash.  Log an error instead
but continue.

This addresses a problem where a cluster has both (1) an unexpected clone
and (2) the clone is not present on all replicas.  Doing repair on that
PG will both not fix the unexpected clone and also cause the remaining
OSDs to crash trying to recover it.

Include a test.

Fixes: https://tracker.ceph.com/issues/24396
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 154330fd68d952a4e1b972891f02b6dc9c355424)
qa/standalone/scrub/osd-unexpected-clone.sh [new file with mode: 0755]
src/osd/PrimaryLogPG.cc