Skip to content

Commit

Permalink
[rabbitmq] Add information on maybe_stuck() processes for RMQ
Browse files Browse the repository at this point in the history
We have seen environments in which simple commands such as

    rabbitmqctl list_queues

Get stuck and do not produce any output. We found it helpful to run

    rabbitmqctl eval 'rabbitmq_diagnostics:maybe_stuck().'

To obtain a list of "stuck" Erlang processes for further analysis.
This change adds the output of the above command to the sosreport.

Depends-On: #2232
Closes: https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/1890846
Resolves: #2189

Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
  • Loading branch information
nicolasbock authored and TurboTurtle committed Sep 14, 2020
1 parent 895d099 commit af58917
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sos/report/plugins/rabbitmq.py
Expand Up @@ -37,8 +37,16 @@ def setup(self):
self.fmt_container_cmd(container, 'rabbitmqctl report'),
foreground=True
)
self.add_cmd_output(
self.fmt_container_cmd(
container, "rabbitmqctl eval "
"'rabbit_diagnostics:maybe_stuck().'"),
foreground=True
)
else:
self.add_cmd_output("rabbitmqctl report")
self.add_cmd_output(
"rabbitmqctl eval 'rabbit_diagnostics:maybe_stuck().'")

self.add_copy_spec([
"/etc/rabbitmq/*",
Expand Down

0 comments on commit af58917

Please sign in to comment.