Skip to content

Commit

Permalink
Fix node.py: try_shutdown and cleanup (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
demonolock authored Sep 20, 2024
1 parent 78603f8 commit 177724b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testgres/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def _try_shutdown(self, max_attempts, with_force=False):
# If force stopping is enabled and PID is valid
if with_force and node_pid != 0:
# If we couldn't stop the node
p_status_output = self.os_ops.exec_command(cmd=f'ps -p {node_pid}', shell=True).decode('utf-8')
p_status_output = self.os_ops.exec_command(cmd=f'ps -o pid= -p {node_pid}', shell=True, ignore_errors=True).decode('utf-8')
if self.status() != NodeStatus.Stopped and p_status_output and str(node_pid) in p_status_output:
try:
eprint(f'Force stopping node {self.name} with PID {node_pid}')
Expand Down

0 comments on commit 177724b

Please sign in to comment.