1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/daemons
Tony Asleson 85fcbfd9d7 lvmdbusd: Instruct lvm to output debug to file for fullreport
Historically we have seen a few different errors which occur when we call
fullreport.  Failing exit code and JSON which is missing one or more keys.
Instruct lvm to dump the debug to a file during fullreport calls when we
fork & exec lvm. If we encounter an error, ouput the debug data.
The reason this isn't being done when lvmshell is used is because we
don't have an easy way to test the error paths.

This change is complicated by the following:

1. We don't know if fullreport was good until we evaluate all the JSON.
   This is done a bit after we have called into lvm and returned.
2. We don't want to orphan the debug file used by lvm if the daemon is
   killed. Thus we try to minimize the window where the debug file hasn't
   already been unlinked.  A RFE to pass an open FD to lvm for this
   purpose is outstanding.

The temp. file is:
-rw------. 1 root root /tmp/lvmdbusd.lvm.debug.XXXXXXXX.log
2022-09-16 10:49:37 -05:00
..
cmirrord gcc: increate buffer sizes 2022-01-26 15:09:58 +01:00
dmeventd gcc: match types 2021-09-22 17:18:50 +02:00
lvmdbusd lvmdbusd: Instruct lvm to output debug to file for fullreport 2022-09-16 10:49:37 -05:00
lvmlockd lvmlockd: return error from vgcreate init_vg_sanlock 2022-04-08 11:34:04 -05:00
lvmpolld cov: add some initializers 2021-09-13 12:34:41 +02:00
Makefile.in build: Remove lvmetad leftovers 2018-07-24 15:02:32 +02:00