]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Fri, 4 Aug 2023 07:17:35 +0000 (12:47 +0530)
commit6ca1bffe57224a84da00a6f714c0535703d45e0d
treefdf3cf60f177d9bf6e411e3c16badbb2cb409f01
parent8b1303f4b1d740eb6a73a7be54294e346def7b60
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
src/pybind/mgr/volumes/fs/fs_util.py
src/pybind/mgr/volumes/fs/operations/volume.py
src/pybind/mgr/volumes/fs/volume.py