Skip to content

Commit

Permalink
[PLAT-14774] Per process tserver metrics is not working if YSQL is di…
Browse files Browse the repository at this point in the history
…sabled

Summary: Fixed pid list calculation for tserver whithout postgres subprocess

Test Plan:
- Create universe without YSQL
- Verify node metrics are collected

Reviewers: amalyshev

Reviewed By: amalyshev

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D36890
  • Loading branch information
yorq committed Aug 1, 2024
1 parent 3040472 commit e052089
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions managed/src/main/resources/health/node_health.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -1733,8 +1733,9 @@ class NodeChecker():
pid_list.append(root_pid)
if process_name == TSERVER:
postgre_pid = self.get_process_pid_by_name(POSTMASTER)
pid_list.remove(postgre_pid)
pid_list = [p for p in pid_list if p not in self._get_subprocess_pids(postgre_pid)]
if postgre_pid is not None:
pid_list.remove(postgre_pid)
pid_list = [p for p in pid_list if p not in self._get_subprocess_pids(postgre_pid)]
total_stat = self._get_empty_proc_results()
prev_process_map = {}
if process_name in self.prev_process_results.keys():
Expand Down

0 comments on commit e052089

Please sign in to comment.