]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon, osd: add command to remove invalid pg-upmap-primary entries 62190/head
authorLaura Flores <lflores@ibm.com>
Fri, 7 Mar 2025 06:22:00 +0000 (06:22 +0000)
committerLaura Flores <lflores@ibm.com>
Mon, 17 Mar 2025 22:25:52 +0000 (17:25 -0500)
commit6e9e2033bf0f4779bdfac9a3a4f29115459c8c0e
treed21063314b1d9e9cf2a7b99107ee4bf2accc7eb2
parentf5f9af4ff4f4238f0af2c3572ac46fcf94d3de82
mon, osd: add command to remove invalid pg-upmap-primary entries

The current rm-pg-upmap-primary command checks that the pgid exists
in the pgmap before continuing to remove it. Due to https://tracker.ceph.com/issues/66867,
some invalid pg-upmap-primary entires may exist for pools that have been removed.
Currently, these mappings are impossible to remove since the pgids no longer
exist in the pgmap.

This new command, rm-pg-upmap-primary-all, allows users the ability to remove
any and all pg-upmap-primary mappings in the osdmap at once, which includes
valid and invalid entries.

This command may also be helpful when upgrading from versions where users
are plagued by https://tracker.ceph.com/issues/61948. Users may use an upgraded
mon to remove all pg-upmap-primray entries (valid and invalid) so they continue
to upgrade to a safe version.

See manual testing for this patch here: https://tracker.ceph.com/issues/67179#note-12

Fixes: https://tracker.ceph.com/issues/67179
Fixes: https://tracker.ceph.com/issues/69760
Signed-off-by: Laura Flores <lflores@ibm.com>
src/mon/MonCommands.h
src/mon/OSDMonitor.cc
src/osd/OSDMap.cc
src/osd/OSDMap.h