From: Tim Serong Date: Thu, 8 Dec 2022 00:54:17 +0000 (+1100) Subject: ceph-crash: log warning if crash directory unreadable X-Git-Tag: v17.2.6~131^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd7b93413943540de4f82fb42b51d5ca8608d78b;p=ceph.git 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) --- diff --git a/src/ceph-crash.in b/src/ceph-crash.in index d5c7260614e4..74e50e2b253f 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):