Skip to contentSkip to conversation

master - lvmdbusd: Prevent running --nojson with VDO support

PATCH Tony Asleson 1 participant 1 message Oct 30, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=df2292020bd9298d511e4e2fb6a54fe0cb6e7607
Commit:        df2292020bd9298d511e4e2fb6a54fe0cb6e7607
Parent:        5b224d58f7cb72852c0bad87d3a0b4fb9250b132
Author:        Tony Asleson <[email protected]>
AuthorDate:    Wed Oct 9 11:20:18 2019 -0500
Committer:     Tony Asleson <[email protected]>
CommitterDate: Wed Oct 30 10:38:40 2019 -0500

lvmdbusd: Prevent running --nojson with VDO support

---
 daemons/lvmdbusd/main.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
daemons/lvmdbusd/main.py +4 -0
index de384ce..c128535 100644
@@ -131,6 +131,10 @@ def main():
 	# exists.
 	cfg.vdo_support = supports_vdo()
 
+	if cfg.vdo_support and not cfg.args.use_json:
+		log_error("You cannot specify --nojson when lvm has VDO support")
+		sys.exit(1)
+
 	# List of threads that we start up
 	thread_list = []