]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-objectstore-tool: import pg at original epoch
authorSage Weil <sage@redhat.com>
Mon, 10 Sep 2018 18:24:19 +0000 (13:24 -0500)
committerSage Weil <sage@redhat.com>
Thu, 20 Sep 2018 17:58:00 +0000 (12:58 -0500)
commit26cb966cab6b0e1d6da54799b8a5a4430a9c3491
tree1288d72db61e188dd052180de64ffacfba87cc9b
parent1e6c8badcb0441f895c7bfe3897957a0a364c574
ceph-objectstore-tool: import pg at original epoch

- In the jewel era, we fast-forwarded the PG to the OSD's latest epoch
and cleared past_intervals.

- In mimic, as of 2347ecb9614b0cd4cd9eae1d67b03119cc7ad18e, we brought the
PG up to date while updating past_intervals.  (At the same time we removed
the OSD's parallel past_intervals regeneration.)

The problem is that the tool then has to reimplement the past_intervals
update logic, and *also* has to cope with splits and merges.  Splits are
somewhat easier (until now we enable partial import of a PG into a split
child), but merges are not so easy.

This patch changes it so we import the PG and leave the pg_epoch matching
the import file.  The OSD is then responsible for bringing it up to date
with the latest map, and dealing with any intervening splits or merges.

We also adjust the safety check to ensure that we don't collide with
any existing PG, either a child we eventually split into, or a parent
we eventually merge into.

Fixes: http://tracker.ceph.com/issues/35955
Signed-off-by: Sage Weil <sage@redhat.com>
qa/standalone/osd/pg-merge.sh [deleted file]
qa/standalone/osd/pg-split-merge.sh [new file with mode: 0755]
qa/standalone/special/ceph_objectstore_tool.py
src/osd/OSD.cc
src/tools/ceph_objectstore_tool.cc