From 03d35d64dc0a9ca3465630c2e0d15a670f31c5d6 Mon Sep 17 00:00:00 2001 From: Krishna Agarwal <62741600+kagarwal06@users.noreply.github.com> Date: Fri, 31 May 2024 18:40:20 +0530 Subject: [PATCH] Debug --- tests/kafkatest/services/kafka/kafka.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kafkatest/services/kafka/kafka.py b/tests/kafkatest/services/kafka/kafka.py index 172bf4f5479f..c7e8a0a65efa 100644 --- a/tests/kafkatest/services/kafka/kafka.py +++ b/tests/kafkatest/services/kafka/kafka.py @@ -926,7 +926,7 @@ def run_features_command(self, op, new_version): def pids(self, node): """Return process ids associated with running processes on the given node.""" try: - cmd = "jcmd | grep -e %s -e %s | awk '{print $1}'" % (self.java_class_name(), self.deprecated_cp_java_class_name()) + cmd = "ps ax | grep -e %s -e %s | grep -v grep | awk '{print $1}'" % (self.java_class_name(), self.deprecated_cp_java_class_name()) pid_arr = [pid for pid in node.account.ssh_capture(cmd, allow_fail=True, callback=int)] return pid_arr except (RemoteCommandError, ValueError) as e: @@ -994,9 +994,9 @@ def thread_dump(self, node): def clean_node(self, node): JmxMixin.clean_node(self, node) self.security_config.clean_node(node) - node.account.kill_java_processes(self.java_class_name(), + node.account.kill_process(self.java_class_name(), clean_shutdown=False, allow_fail=True) - node.account.kill_java_processes(self.deprecated_cp_java_class_name(), + node.account.kill_process(self.deprecated_cp_java_class_name(), clean_shutdown=False, allow_fail=True) node.account.ssh("sudo rm -rf -- %s" % KafkaService.PERSISTENT_ROOT, allow_fail=False)