]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-crash: log warning if crash directory unreadable 49314/head
authorTim Serong <tserong@suse.com>
Thu, 8 Dec 2022 00:54:17 +0000 (11:54 +1100)
committerTim Serong <tserong@suse.com>
Thu, 8 Dec 2022 01:02:49 +0000 (12:02 +1100)
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 <tserong@suse.com>
src/ceph-crash.in

index 6e816a80134afb9d860feb2de9cbcfd55f062b23..0e02837fadd4dde8abd66985b485836402e10a37 100755 (executable)
@@ -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):