]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Fix pending_subvolume_deletions in volume info
authorKotresh HR <khiremat@redhat.com>
Wed, 2 Aug 2023 10:37:56 +0000 (16:07 +0530)
committerKotresh HR <khiremat@redhat.com>
Thu, 21 Sep 2023 07:48:13 +0000 (13:18 +0530)
commitbfdd1bbb0f36674e74f1cc0e95b1a81e797255e0
tree83855d9009ca8b9c83c3b8b65ed0de3a73279cfa
parent24e952ef9d995d1bd1e6ff1f9eb2b045ebb3db9b
mgr/volumes: Fix pending_subvolume_deletions in volume info

Problem:
 The pending_subvolume_deletions field in 'fs volume info' output is
always zero

Cause:
 The 'os.listdir' being used to list the trash directory didn't have
subvolume basdir context. Hence it was always failing with ENOENT.

Fix:
 Modify the fs_util's listdir function to list the files as well and use it.

Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/62278
(cherry picked from commit 6ca1bffe57224a84da00a6f714c0535703d45e0d)
src/pybind/mgr/volumes/fs/fs_util.py
src/pybind/mgr/volumes/fs/operations/volume.py
src/pybind/mgr/volumes/fs/volume.py