Blame SOURCES/sos-bz1819662-rabbitmqctl-on-foreground.patch

a02485
From c805cd23b8bd73986f2546a711edd42150d855ba Mon Sep 17 00:00:00 2001
a02485
From: Pavel Moravec <pmoravec@redhat.com>
a02485
Date: Fri, 22 May 2020 12:05:00 +0200
a02485
Subject: [PATCH] [rabbitmq] emulate TTY via timeout foreground
a02485
a02485
"docker exec -t" might hang without a terminal. Let emulate TTY via
a02485
timeout --foreground instead.
a02485
a02485
Resolves: #2083
a02485
a02485
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
a02485
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
a02485
---
a02485
 sos/plugins/rabbitmq.py | 4 ++--
a02485
 1 file changed, 2 insertions(+), 2 deletions(-)
a02485
a02485
diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py
a02485
index 9ebf6c0b..8d9a16ff 100644
a02485
--- a/sos/plugins/rabbitmq.py
a02485
+++ b/sos/plugins/rabbitmq.py
a02485
@@ -38,8 +38,8 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
a02485
             for container in container_names:
a02485
                 self.add_cmd_output('docker logs {0}'.format(container))
a02485
                 self.add_cmd_output(
a02485
-                    'docker exec -t {0} rabbitmqctl report'
a02485
-                    .format(container)
a02485
+                    'docker exec {0} rabbitmqctl report'
a02485
+                    .format(container), foreground=True
a02485
                 )
a02485
         else:
a02485
             self.add_cmd_output("rabbitmqctl report")
a02485
-- 
a02485
2.21.3
a02485