Blame SOURCES/0060-lvmdbusd-Set-LVM_COMMAND_PROFILE-lvmdbusd.patch

8342e7
From 0aa45120e92fe8b0f379d00f3a031e3c53feca43 Mon Sep 17 00:00:00 2001
8342e7
From: Tony Asleson <tasleson@redhat.com>
8342e7
Date: Wed, 24 Aug 2022 15:37:56 -0500
8342e7
Subject: [PATCH 3/6] lvmdbusd: Set LVM_COMMAND_PROFILE=lvmdbusd
8342e7
8342e7
We need this to prevent lvm from interleaving the JSON output with errors
8342e7
written to stderr.
8342e7
8342e7
(cherry picked from commit a5e6947d74f7b88f7f0df4328a923ad82a970634)
8342e7
---
8342e7
 daemons/lvmdbusd/main.py | 4 +++-
8342e7
 1 file changed, 3 insertions(+), 1 deletion(-)
8342e7
8342e7
diff --git a/daemons/lvmdbusd/main.py b/daemons/lvmdbusd/main.py
8342e7
index b0a82d492..eaea13ef8 100644
8342e7
--- a/daemons/lvmdbusd/main.py
8342e7
+++ b/daemons/lvmdbusd/main.py
8342e7
@@ -112,8 +112,10 @@ def main():
8342e7
 
8342e7
 	use_session = os.getenv('LVMDBUSD_USE_SESSION', False)
8342e7
 
8342e7
-	# Ensure that we get consistent output for parsing stdout/stderr
8342e7
+	# Ensure that we get consistent output for parsing stdout/stderr and that we
8342e7
+	# are using the lvmdbusd profile.
8342e7
 	os.environ["LC_ALL"] = "C"
8342e7
+	os.environ["LVM_COMMAND_PROFILE"] = "lvmdbusd"
8342e7
 
8342e7
 	cfg.args = parser.parse_args()
8342e7
 	cfg.create_request_entry = RequestEntry
8342e7
-- 
8342e7
2.38.1
8342e7