This will be invoked by purge threads, so be sure to catch all
exceptions and return proper error codes appropriately.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit
04547c92c1424c3c17aa84c49bfbfe0ffe4ac781)
self.fs.rmdir(root_path)
trashpath = spec.trash_path
- rmtree(trashpath)
+ # catch any unlink errors
+ try:
+ rmtree(trashpath)
+ except cephfs.Error as e:
+ raise VolumeException(-e.args[0], e.args[1])
def get_subvolume_path(self, spec):
path = spec.subvolume_path