ceph/qa/workunits/cephtool
xie xingguo be07a418b5 mon: OSDMonitor: add a guard for prepare_remove_snaps()
Method preprocess_remove_snaps() is designed to fast check whether
we can safely handle a remove-snaps-request without changing the osdmap.
The original design is to be able to handle snaps from multiple pools,
including those snaps even from a non-existent pool by simply skipping
over them. However, this method will quit on successfully detecting
any vaild snap which is truly needed to be removed and forward this
request to prepare_remove_snaps() for further processing.

From the above analysis, the prepare_remove_snaps() method will
theoretically also encounter some snaps which possibly belong to
non-existent pools.

This pr solves the above problem by adding a sanity check against
pool existense associated with the specified snap to be removed, which
shall be considered as a defensive move and makes prepare_remove_snaps()
stronger.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-07 17:31:58 +08:00
..
test_daemon.sh
test.sh mon: OSDMonitor: add a guard for prepare_remove_snaps() 2016-04-07 17:31:58 +08:00