Blame SOURCES/sos-bz1932772-candlepin-foreman_psql_with_--no-password_1.patch

4b1b63
From ea9be29ef1635e317477c4bce3187671f414f76e Mon Sep 17 00:00:00 2001
4b1b63
From: Jan Jansky <jjansky@redhat.com>
4b1b63
Date: Mon, 1 Mar 2021 13:24:44 +0100
4b1b63
Subject: [PATCH] [foreman] call psql with --no-password to avoid waiting on
4b1b63
 input
4b1b63
4b1b63
Backport #2422 to legacy-3.9.
4b1b63
4b1b63
Resolves: #2429
4b1b63
Closes: #2421
4b1b63
4b1b63
Signed-off-by: Jan Jansky <jjansky@redhat.com>
4b1b63
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
4b1b63
---
4b1b63
 sos/plugins/foreman.py | 3 ++-
4b1b63
 1 file changed, 2 insertions(+), 1 deletion(-)
4b1b63
4b1b63
diff --git a/sos/plugins/foreman.py b/sos/plugins/foreman.py
4b1b63
index ff79b81..84fb4b0 100644
4b1b63
--- a/sos/plugins/foreman.py
4b1b63
+++ b/sos/plugins/foreman.py
4b1b63
@@ -261,7 +261,8 @@ class Foreman(Plugin):
4b1b63
         a large amount of quoting in sos logs referencing the command being run
4b1b63
         """
4b1b63
         csvformat = "-A -F , -X" if csv else ""
4b1b63
-        _dbcmd = "psql -h %s -p 5432 -U foreman -d foreman %s -c %s"
4b1b63
+        _dbcmd = "psql --no-password -h %s -p 5432 -U foreman -d foreman %s \
4b1b63
+                  -c %s"
4b1b63
         return _dbcmd % (self.dbhost, csvformat, quote(query))
4b1b63
 
4b1b63
     def postproc(self):
4b1b63
-- 
4b1b63
1.8.3.1
4b1b63