]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-crash: log warning if crash directory unreadable 48804/head
authorTim Serong <tserong@suse.com>
Thu, 8 Dec 2022 00:54:17 +0000 (11:54 +1100)
committerTim Serong <tserong@suse.com>
Fri, 27 Jan 2023 11:27:45 +0000 (22:27 +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>
(cherry picked from commit d139f6d112e6118f0f458dbfff9550b3ce312d20)

src/ceph-crash.in

index d5c7260614e49257003d78e3ef271b6bb747f090..74e50e2b253f36df7a601e0251755b14ad37df22 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):