]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Fail subvolume removal if it's in progress
authorKotresh HR <khiremat@redhat.com>
Fri, 16 Jul 2021 10:28:37 +0000 (15:58 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 30 Jul 2021 07:44:28 +0000 (13:14 +0530)
commit103c7bdc70ca5316dd9b6dbf67ff0a19e99dc9d6
treeda098bea256ac65be0d579aefbea5ca70f47b413
parentc79942df42bd102141c521557f542c2e4ee5fe2a
mgr/volumes: Fail subvolume removal if it's in progress

Removing an in-progress subvolume clone with force doesn't
remove the clone index (tracker). This results in the cloner
thread to stuck in loop trying to clone the deleted one.

This patch addresses the issue by not allowing the subvolume clone
to be removed if it's not complete/cancelled/failed even with force option.
It throws the error EAGAIN, asking the user to cancel the pending clone
and retry.

Fixes: https://tracker.ceph.com/issues/51707
Signed-off-by: Kotresh HR <khiremat@redhat.com>
qa/tasks/cephfs/test_volumes.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v2.py
src/pybind/mgr/volumes/fs/volume.py