osd/SnapMapper: fix pacific legacy key conversion and introduce test
Octopus modified the SnapMapper key format from
<LEGACY_MAPPING_PREFIX><snapid>_<shardid>_<hobject_t::to_str()>
to
<MAPPING_PREFIX><pool>_<snapid>_<shardid>_<hobject_t::to_str()>
When this change was introduced,
94ebe0ea also introduced a conversion
with a crucial bug which essentially destroyed legacy keys by mapping them
to
<MAPPING_PREFIX><poolid>_<snapid>_
without the object-unique suffix. This commit fixes this conversion going
forward, but a fix for existing clusters still needs to be developed.
Fixes: https://tracker.ceph.com/issues/56147
Signed-off-by: Manuel Lausch <manuel.lausch@1und1.de>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit
66bea86ab447b2db8a948c7913dc6c7a4a995c31)
(cherry picked from commit
9b5fbb8cb80c1d606f138bdbdce62686c084207a)
Resolves: rhbz#
2107404