]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
dispatcher: fix AccessDenied on process lookup
authorKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Thu, 1 Aug 2024 21:58:08 +0000 (23:58 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Fri, 2 Aug 2024 17:26:27 +0000 (19:26 +0200)
On macOS dispatcher while trying to go through process list gets stuck
on some of the system processes like launchd, logd, systemstats, etc.
and quites unexpectedly with PermissionError and psutil.AccessDenied
exceptions.

Fixes: https://tracker.ceph.com/issues/67313
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
teuthology/dispatcher/__init__.py

index 7cbaf7449b6e991a7072ffe33493eb7376d447b3..e97d17513b3e8bb01143a320d1edc6413ecf696a 100644 (file)
@@ -205,6 +205,8 @@ def find_dispatcher_processes() -> Dict[str, List[psutil.Process]]:
     def match(proc):
         try:
             cmdline = proc.cmdline()
+        except psutil.AccessDenied:
+            return False
         except psutil.ZombieProcess:
             return False
         if len(cmdline) < 3: