Bug #54625
closedIssue removing subvolume with retained snapshots - Possible quincy regression?
100%
Description
To summarize:
- ceph fs subvolume create ...
- ceph fs subvolume info ... # ^^^ verify that subvolume supports retention
- ceph fs subvolume snapshot create ...
- ceph fs subvolume rm ... # ^^^ this is expected to fail. and does!
- ceph fs subvolume rm --retain_snapshots ... # ^^^ succeeds (subvol goes to "snapshot-retained" state)
- ceph fs subvolume snapshot rm ...
- ceph fs subvolume rm ...
Now I expect that last "subvolume rm" to pass as the retained snapshot has been deleted on the previous step.
However, on quincy, it fails with the error "clone in-progress -- please cancel the clone and retry"
But no clones are in progress as far as I can tell, as this procedure doesn't involve cloning at all.
I took a quick look at the code and I wonder if the function safe_to_remove_subvolume_clone simply isn't considering the "snapshot-retained" state. It checks for complete/canceled/failed and only accepts those. So my guess that this is an unintended regression. However, if this is expected behavior please point me in the right direction... I couldn't find anything relevant in the quincy docs branch.
FWIW this test that I'm running is part of go-ceph project and thus this could impact the ceph-csi project when used with ceph quincy.