From 0832ddc52496cd81aa7c2e1e85252b50d2f33044 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 8 Nov 2017 09:09:06 -0500 Subject: [PATCH] ceph-volume simple.scan skip directories to scan Signed-off-by: Alfredo Deza (cherry picked from commit 6bc1e9ee0b8d7bc475f218ae3dd8c6c7fe5a983a) --- src/ceph-volume/ceph_volume/devices/simple/scan.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ceph-volume/ceph_volume/devices/simple/scan.py b/src/ceph-volume/ceph_volume/devices/simple/scan.py index d83cc3c42d3..df916e73ea0 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 -- 2.47.3