From 541ad16f64c93fc966ee167b9ef1ace1f5156678 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Thu, 8 Dec 2022 11:54:17 +1100 Subject: [PATCH] ceph-crash: log warning if crash directory unreadable This is to aid in debugging in case crashes aren't posted as expected (see https://tracker.ceph.com/issues/58098 for discussion). Signed-off-by: Tim Serong (cherry picked from commit d139f6d112e6118f0f458dbfff9550b3ce312d20) --- src/ceph-crash.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ceph-crash.in b/src/ceph-crash.in index d5c7260614e49..74e50e2b253f3 100755 --- a/src/ceph-crash.in +++ b/src/ceph-crash.in @@ -66,6 +66,9 @@ def post_crash(path): def scrape_path(path): for p in os.listdir(path): crashpath = os.path.join(path, p) + if not os.access(crashpath, os.R_OK): + log.warning('unable to read crash path %s' % (crashpath)) + continue metapath = os.path.join(crashpath, 'meta') donepath = os.path.join(crashpath, 'done') if os.path.isfile(metapath): -- 2.39.5