summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Asleson <tasleson@redhat.com>2022-08-24 15:37:56 -0500
committerTony Asleson <tasleson@redhat.com>2022-09-16 10:49:37 -0500
commita5e6947d74f7b88f7f0df4328a923ad82a970634 (patch)
tree51e5b0ed719902a7f2f2c5c2d69b6d95c2a24e95
parent9693709b4642c7ef0c82f117b4f776a1e688d851 (diff)
downloadlvm2-a5e6947d74f7b88f7f0df4328a923ad82a970634.tar.gz
lvmdbusd: Set LVM_COMMAND_PROFILE=lvmdbusd
We need this to prevent lvm from interleaving the JSON output with errors written to stderr.
-rw-r--r--daemons/lvmdbusd/main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemons/lvmdbusd/main.py b/daemons/lvmdbusd/main.py
index dc6aa2277..c58c518d1 100644
--- a/daemons/lvmdbusd/main.py
+++ b/daemons/lvmdbusd/main.py
@@ -132,8 +132,10 @@ def main():
start = time.time()
use_session = os.getenv('LVMDBUSD_USE_SESSION', False)
- # Ensure that we get consistent output for parsing stdout/stderr
+ # Ensure that we get consistent output for parsing stdout/stderr and that we
+ # are using the lvmdbusd profile.
os.environ["LC_ALL"] = "C"
+ os.environ["LVM_COMMAND_PROFILE"] = "lvmdbusd"
# Add simple command line handling
cfg.args = process_args()