]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
find_dispatcher_processes: Ignore zombies safely
authorZack Cerza <zack@redhat.com>
Wed, 3 Jan 2024 19:25:50 +0000 (12:25 -0700)
committerZack Cerza <zack@redhat.com>
Wed, 3 Jan 2024 22:22:02 +0000 (15:22 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/dispatcher/__init__.py

index 02ed2ee709809e93bf97cee5d606c33cc8cd9b58..8a0ee1af1c83cc35425bb527e333e02d2b9cfca8 100644 (file)
@@ -208,7 +208,10 @@ def main(args):
 
 def find_dispatcher_processes() -> Dict[str, List[psutil.Process]]:
     def match(proc):
-        cmdline = proc.cmdline()
+        try:
+            cmdline = proc.cmdline()
+        except psutil.ZombieProcess:
+            return False
         if len(cmdline) < 3:
             return False
         if not cmdline[1].endswith("/teuthology-dispatcher"):