From: Matan Breizman Date: Thu, 29 Feb 2024 14:46:31 +0000 (+0000) Subject: mon/OSDMonitor: fix rmsnap command X-Git-Tag: v17.2.8~392^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f87e1116e2ea40a9e1fc9e5609ea6df010b29e38;p=ceph.git mon/OSDMonitor: fix rmsnap command ``` There are 2 ways to remove pool snaps, rados tool or mon command (ceph osd pool rmsnap). It seems that the monitor command is not reporting the actual removal via new_removed_snaps which is later proceed in OSDMap::apply_incremental. This will result in a clone object leakage since the snap id won't be marked as purged (and won't be trimmed). ``` Fixes: https://tracker.ceph.com/issues/64646 Signed-off-by: Matan Breizman (cherry picked from commit f19ad233025957964559410e6697aa8a2a024bc1) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 297d4b6c4350..740c037603cf 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -12957,6 +12957,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, if (sn) { pp->remove_snap(sn); pp->set_snap_epoch(pending_inc.epoch); + pending_inc.new_removed_snaps[pool].insert(sn); ss << "removed pool " << poolstr << " snap " << snapname; } else { ss << "already removed pool " << poolstr << " snap " << snapname;