Skip to content

Commit

Permalink
Merge pull request ceph#1985 from kshtsk/wip-access-denied
Browse files Browse the repository at this point in the history
Fix access denied from psutil on macOS
  • Loading branch information
zmc authored Aug 2, 2024
2 parents 8613d3f + d218c61 commit 7d7f5fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions teuthology/dispatcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions teuthology/kill.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def process_matches_run(pid, run_name):
return True
except psutil.NoSuchProcess:
pass
except psutil.AccessDenied:
pass
return False


Expand Down

0 comments on commit 7d7f5fe

Please sign in to comment.