mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmdbusd: Include lvm debug output for lvmshell
Move the option to add the debug file into lvm_full_report_json so that we collect the debug data when we fork & exec lvm and when we use lvm shell.
This commit is contained in:
parent
a4b7f988d8
commit
11c033c222
@ -121,12 +121,6 @@ def call_lvm(command, debug=False, line_cb=None,
|
|||||||
command.insert(0, cfg.LVM_CMD)
|
command.insert(0, cfg.LVM_CMD)
|
||||||
command = add_no_notify(command)
|
command = add_no_notify(command)
|
||||||
|
|
||||||
# If we are running the fullreport command, we will ask lvm to output the debug
|
|
||||||
# data, so we can have the required information for lvm to debug the fullreport failures.
|
|
||||||
if "fullreport" in command:
|
|
||||||
fn = cfg.lvmdebug.setup()
|
|
||||||
add_config_option(command, "--config", "log {level=7 file=%s syslog=0}" % fn)
|
|
||||||
|
|
||||||
process = Popen(command, stdout=PIPE, stderr=PIPE, close_fds=True,
|
process = Popen(command, stdout=PIPE, stderr=PIPE, close_fds=True,
|
||||||
env=os.environ)
|
env=os.environ)
|
||||||
|
|
||||||
@ -618,6 +612,11 @@ def lvm_full_report_json():
|
|||||||
'--reportformat', 'json'
|
'--reportformat', 'json'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# We are running the fullreport command, we will ask lvm to output the debug
|
||||||
|
# data, so we can have the required information for lvm to debug the fullreport failures.
|
||||||
|
fn = cfg.lvmdebug.setup()
|
||||||
|
add_config_option(cmd, "--config", "log {level=7 file=%s syslog=0}" % fn)
|
||||||
|
|
||||||
rc, out, err = call(cmd)
|
rc, out, err = call(cmd)
|
||||||
# When we have an exported vg the exit code of lvs or fullreport will be 5
|
# When we have an exported vg the exit code of lvs or fullreport will be 5
|
||||||
if rc == 0 or rc == 5:
|
if rc == 0 or rc == 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user