]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/PG: invalidate PG if merging with unexpected version
authorSage Weil <sage@redhat.com>
Mon, 11 Mar 2019 22:35:27 +0000 (17:35 -0500)
committerSage Weil <sage@redhat.com>
Tue, 12 Mar 2019 15:08:46 +0000 (10:08 -0500)
commitfb915c4805c5fa0342c95eb6cd201529ea16e72e
tree94fb73bd1491e34ecc0b670f05532c776f1da210
parent6da520e0756179052cc4f125b50d73cffcbac001
osd/PG: invalidate PG if merging with unexpected version

If the source or target PG version is 0'0, we may silently take the max
of the source and target and still leave the PG complete.  This
specifically can happen with an empty PG, as seen with bug 38655.  In
theory we could encounter one of the PGs with some other last_update
that doesn't match what we expect.  If that ever happens, make sure the
result is incomplete so that backfill can clean up.

Additionally check that the pool metadata for the last merge matches the
PGs at all.  This could mismatch if we have an osdmap gap and are forced
to do some merge without merge info at all... in which case we should
definitely invalidate: there should be newer copies of the PG(s), and we
have no idea whether the PGs we are merging are what we want.  If this is
some disaster recovery situation, an operator is always free to use
ceph-objectstore-tool to re-mark a PG complete (at their own peril!).

Fixes: http://tracker.ceph.com/issues/38655
Signed-off-by: Sage Weil <sage@redhat.com>
qa/standalone/osd/pg-split-merge.sh
src/osd/PG.cc