]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon, osd: add command to remove invalid pg-upmap-primary entries 62421/head
authorLaura Flores <lflores@ibm.com>
Fri, 7 Mar 2025 06:22:00 +0000 (06:22 +0000)
committerLaura Flores <lflores@ibm.com>
Thu, 20 Mar 2025 20:33:43 +0000 (20:33 +0000)
commit9a4e9305bf732dc6f9db9a9423342fd23a40fd84
treebff540c5a81359c1496c3e614a7c0a7bb4a26589
parent297492994c919b41e2be08f2e9079929a8758fbf
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>
(cherry picked from commit 6e9e2033bf0f4779bdfac9a3a4f29115459c8c0e)
src/mon/MonCommands.h
src/mon/OSDMonitor.cc
src/osd/OSDMap.cc
src/osd/OSDMap.h