Bug 2145114 - Empty stderr in GetError for failed lvmdbusd calls
Summary: Empty stderr in GetError for failed lvmdbusd calls
Keywords:
Status: POST
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks: 2164044 2207613
TreeView+ depends on / blocked
 
Reported: 2022-11-23 08:16 UTC by Vojtech Trefny
Modified: 2024-04-27 05:53 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 2164044 (view as bug list)
Environment:
Last Closed:
Embargoed:
pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?


Attachments (Terms of Use)
lvmdbusd flight recorder (6.25 KB, text/plain)
2022-11-23 08:16 UTC, Vojtech Trefny
no flags Details

Description Vojtech Trefny 2022-11-23 08:16:30 UTC
Created attachment 1926603 [details]
lvmdbusd flight recorder

Description of problem:

stderr from lvcreate is not included in the error we get from the LVM DBus job with the latest LVM 2.03.17.

Version-Release number of selected component (if applicable):

$ lvm version
  LVM version:     2.03.17(2) (2022-11-10)
  Library version: 1.02.187 (2022-11-10)

Steps to Reproduce:

Try to create an LV that is too big for the VG, The call fails as expected but, stderr is empty.

# busctl call com.redhat.lvmdbus1 /com/redhat/lvmdbus1/Vg/0 com.redhat.lvmdbus1.Vg LvCreate "sta(ott)ia{sv}" test $((10*1024**3)) 0 0 0
(oo) "/" "/com/redhat/lvmdbus1/Job/0"

# busctl get-property com.redhat.lvmdbus1 /com/redhat/lvmdbus1/Job/0 com.redhat.lvmdbus1.Job GetError
(is) -1 "(\'com.redhat.lvmdbus1.Vg\', \'Exit code 5, stderr = \')"


Expected results:

With older LVM, the stderr is part of the error.
# busctl get-property com.redhat.lvmdbus1 /com/redhat/lvmdbus1/Job/0 com.redhat.lvmdbus1.Job GetError 
(is) -1 "(\'com.redhat.lvmdbus1.Vg\', \'Exit code 5, stderr =   Volume group \"testVG\" has insufficient free space (510 extents): 2560 required.\\n\')"

Comment 1 Tony Asleson 2022-11-28 14:51:03 UTC
According to @vtrefny stderr is present when running lvm command separately.  Issue is with dbus daemon.

Comment 2 Tony Asleson 2022-11-29 19:02:48 UTC
Correction posted upstream: https://sourceware.org/git/?p=lvm2.git;a=commit;h=e63b0c7262f50ab43fcde1c50b6d880acab68407

Comment 3 Vojtech Trefny 2022-11-30 07:47:50 UTC
Thank you, I can confirm the fix works (8f60c494515ddccb20e4afb804edb6b9599e65c0 is also needed), libblockdev test suite (thanks to which I originally discovered the issue) is now passing. Can we get this to Fedora rawhide soon?


Note You need to log in before you can comment on or make changes to this bug.