]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: remove unused crush rules after erasure code pools deleted 53457/head
authorNitzan Mordechai <nmordech@redhat.com>
Thu, 14 Sep 2023 09:41:13 +0000 (09:41 +0000)
committerNitzanMordhai <nmordech@ibm.com>
Thu, 19 Feb 2026 06:14:56 +0000 (06:14 +0000)
commit6eebd03175ce222a777909d45bc87fac2a28fa82
tree3de60787612df6c79a9265df81a10feb70682fa8
parent4e04c6a3457c3463bf89bdbbb19fa39e4bf45978
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>
qa/standalone/mon/osd-crush.sh
src/mon/OSDMonitor.cc