Skip to content

Commit

Permalink
tests/redpanda: Don't exclude redpanda with ']' in args
Browse files Browse the repository at this point in the history
A change was introduced in 81c37c5 that attempted to fix an issue where
an incorrect process was selected as the redpanda process.  The
unintended side-effect was that any actual Redpanda process that
contained a ']' was excluded so methods like `self.redpanda.stop()`
wouldn't actually stop Redpanda as it was unable to find the appropriate
PID.

Fixed `ps` line to exclude "[redpanda]" rather than just "]".

Signed-off-by: Michael Boquard <[email protected]>
  • Loading branch information
michael-redpanda committed Apr 26, 2023
1 parent 6178939 commit 459db6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,7 @@ def remove_local_data(self, node):

def redpanda_pid(self, node):
try:
cmd = "ps ax | grep -i 'redpanda' | grep -v grep | grep -v 'version'| grep -v \"]\" | awk '{print $1}'"
cmd = "ps ax | grep -i 'redpanda' | grep -v grep | grep -v 'version'| grep -v \"\[redpanda\]\" | awk '{print $1}'"
for p in node.account.ssh_capture(cmd,
allow_fail=True,
callback=int):
Expand Down

0 comments on commit 459db6a

Please sign in to comment.