mirror of
https://github.com/ceph/ceph
synced 2025-02-16 07:17:21 +00:00
Verify running pid before passing it to be killed.
So we don't kill other processes that have taken jobs pid since job has been no longer running. Signed-off-by: Sandon Van Ness <sandon@redhat.com>
This commit is contained in:
parent
c7a361bc45
commit
f05ce565cb
@ -152,6 +152,12 @@ def kill_processes(run_name, pids=None):
|
||||
else:
|
||||
to_kill = find_pids(run_name)
|
||||
|
||||
# Remove processes that don't match run-name from the set
|
||||
to_check = set(to_kill)
|
||||
for pid in to_check:
|
||||
if not process_matches_run(pid, run_name):
|
||||
to_kill.remove(pid)
|
||||
|
||||
if len(to_kill) == 0:
|
||||
log.info("No teuthology processes running")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user