From da7aef69f315f56eb9ae792d415fb456a109a9eb Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Thu, 1 Aug 2024 23:58:08 +0200 Subject: [PATCH] dispatcher: fix AccessDenied on process lookup 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 --- teuthology/dispatcher/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teuthology/dispatcher/__init__.py b/teuthology/dispatcher/__init__.py index 7cbaf7449b..e97d17513b 100644 --- a/teuthology/dispatcher/__init__.py +++ b/teuthology/dispatcher/__init__.py @@ -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: -- 2.39.5