]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: remove unused crush rules after erasure code pools deleted 69075/head
authorNitzan Mordechai <nmordech@redhat.com>
Thu, 14 Sep 2023 09:41:13 +0000 (09:41 +0000)
committerNitzan Mordechai <nmordech@redhat.com>
Mon, 25 May 2026 09:06:36 +0000 (12:06 +0300)
commit2aca2bbd44cbf4757da13709424fac25b40880b2
tree0ad068bb37d852310c526a2e7bbb882b786700bc
parent965ff53f375521760d11f744cd7fe39d6e270271
mon/OSDMonitor: remove unused crush rules after erasure code pools deleted

When erasure code pools are created, a corresponding Crush rule is concurrently added to the Crush map.
However, when these pools are subsequently deleted, the associated rule persists within the Crush map.
In the event that a pool is re-created with the same name, the rule already exists.
However, if any modifications were made to the rule prior to the pool's deletion,
the new pool will inherit these modifications.

The proposed solution involves the automatic deletion of the Crush rule when a pool is deleted,
but only if no other pools are utilizing that particular rule.

Fixes: https://tracker.ceph.com/issues/62826
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit 6eebd03175ce222a777909d45bc87fac2a28fa82)
qa/standalone/mon/osd-crush.sh
src/mon/OSDMonitor.cc