From: Alfredo Deza Date: Wed, 8 Nov 2017 14:09:06 +0000 (-0500) Subject: ceph-volume simple.scan skip directories to scan X-Git-Tag: v12.2.2~23^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0832ddc52496cd81aa7c2e1e85252b50d2f33044;p=ceph.git ceph-volume simple.scan skip directories to scan Signed-off-by: Alfredo Deza (cherry picked from commit 6bc1e9ee0b8d7bc475f218ae3dd8c6c7fe5a983a) --- diff --git a/src/ceph-volume/ceph_volume/devices/simple/scan.py b/src/ceph-volume/ceph_volume/devices/simple/scan.py index d83cc3c42d39..df916e73ea09 100644 --- a/src/ceph-volume/ceph_volume/devices/simple/scan.py +++ b/src/ceph-volume/ceph_volume/devices/simple/scan.py @@ -66,6 +66,8 @@ class Scan(object): file_path = os.path.join(path, _file) if os.path.islink(file_path): osd_metadata[_file] = self.scan_device(file_path) + if os.path.isdir(file_path): + continue # the check for binary needs to go before the file, to avoid # capturing data from binary files but still be able to capture # contents from actual files later