Bug 1369846

Summary: Result property of the Job object doesn't always return a valid object path (e.g. for the DetachCachePool method)
Product: [Community] LVM and device-mapper Reporter: Vratislav Podzimek <vpodzime>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: lvmdbusd QA Contact: cluster-qe <cluster-qe>
Status: CLOSED UPSTREAM Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, tasleson, zkabelac
Version: 2.02.164Flags: rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-12 13:48:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 1 Vratislav Podzimek 2016-08-25 11:52:17 UTC
So this is really weird. I'm getting this:

/usr/lib64/python3.5/site-packages/gi/overrides/BlockDev.py:420: Warning: the GVariant format string 'o' has a type of 'o' but the given value has a type of 's'
  ret = orig_obj(*args, **kwargs)
/usr/lib64/python3.5/site-packages/gi/overrides/BlockDev.py:420: Warning: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' failed
  ret = orig_obj(*args, **kwargs)
** (process:22391): DEBUG: Got string: /com/redhat/lvmdbus1/Lv/21

which means that the returned GVariant is reported to be of type 's' instead of 'o' (or not even that, based on the assertion failure), but the extracted value looks like a valid object path.

Comment 2 Tony Asleson 2016-08-25 14:11:34 UTC
(In reply to Vratislav Podzimek from comment #1)
>   ret = orig_obj(*args, **kwargs)
> ** (process:22391): DEBUG: Got string: /com/redhat/lvmdbus1/Lv/21

It's possible that the data is correct, but that the metadata is incorrect.  I'm working on a change to ensure that everything returned from the service is correctly wrapped with the appropriate type wrapper eg. dbus.ObjectPath('/com/redhat/lvmdbus1/Lv/21') to ensure metadata correctness.

Would it be possible to run dbus-monitor --system and capture the output to a file for additional debug?  This way we would see what data and metadata is going across the bus.

Comment 4 Vratislav Podzimek 2016-08-31 06:28:35 UTC
(In reply to Tony Asleson from comment #3)
> Fixed upstream:
> 
> https://lists.fedorahosted.org/archives/list/lvm2-commits@lists.fedorahosted.
> org/thread/L4UHAXEOB6UMQI6PMLHWAHZETGY4RJYB/

Looks good to me,thanks!