Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.1.x] ducktape: use pgrep to find the redpanda process #11417

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #11387
Fixes #11415,

It seems like redpanda_pid can pick up false pids in the current grep
filtering approach. Use `pgrep` to not incorrectly pickup a command with
a command line arg of `redpanda`, which seems likely in our environments.

When debugging redpanda-data#11275, it seems like there is an apport process who's
pid is being picked up. Here's a process dump that includes the line.
There are no running redpanda processes, but checking for redpanda
processes times out, leading me to believe that this process is being
picked up.

In that case `stop_node` can fail if the node is already failed in CDT,
as this process is picked up.

```
[DEBUG - 2023-06-12 02:54:07,216 - redpanda - _log_node_process_state - lineno:2215]: root      136962 99.6  6.0 1587948 1452804 ?     R    02:53   0:49 /usr/bin/python3 /usr/shar
e/apport/apport -p136954 -s5 -c18446744073709551615 -d1 -P136954 -u0 -g0 -- !opt!redpanda_installs!head!libexec!redpanda
```

Fixes: redpanda-data#11275

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
(cherry picked from commit 4a2985f)
@vbotbuildovich vbotbuildovich added this to the v23.1.x-next milestone Jun 14, 2023
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jun 14, 2023
@vbotbuildovich vbotbuildovich requested a review from andijcr June 14, 2023 07:20
@rockwotj rockwotj marked this pull request as ready for review June 14, 2023 13:22
@rockwotj rockwotj merged commit e460e39 into redpanda-data:v23.1.x Jun 14, 2023
@vshtokman vshtokman modified the milestones: v23.1.x-next, v23.1.13 Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants