Bug 1376840 - TypeError: __new__() argument 1 must be str, not LvThinPool
Summary: TypeError: __new__() argument 1 must be str, not LvThinPool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.165
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Tony Asleson
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-16 14:37 UTC by Vratislav Podzimek
Modified: 2017-09-13 15:38 UTC (History)
7 users (show)

Fixed In Version: 2.02.166
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-13 15:38:10 UTC
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Vratislav Podzimek 2016-09-16 14:37:39 UTC
Description of problem:
When running libblockdev-lvm-dbus tests, I'm getting following errors:

Traceback (most recent call last):
  File "/home/jenkins/workspace/libblockdev-PR/tests/lvm_dbus_tests.py", line 967, in test_thpool_convert
    succ = BlockDev.lvm_thpool_convert("testVG", "dataLV", "metadataLV", "testPool", None)
  File "/home/jenkins/workspace/libblockdev-PR/src/python/gi/overrides/BlockDev.py", line 500, in lvm_thpool_convert
    return _lvm_thpool_convert(vg_name, data_lv, metadata_lv, name, extra)
GLib.GError: g-io-error-quark: Getting result after waiting for 'CreateThinPool' method of the '/com/redhat/lvmdbus1/Vg/47' object failed: Failed to get Result property of the /com/redhat/lvmdbus1/Job/16 object: GDBus.Error:org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/automatedproperties.py", line 72, in Get
    value = getattr(self, property_name)
  File "/usr/lib/python3.5/site-packages/lvmdbusd/job.py", line 163, in Result
    return dbus.ObjectPath(self.state.Result)
TypeError: __new__() argument 1 must be str, not LvThinPool
 (36)


Additional info:
This started happening after the most recent update of the python3 package on Rawhide:
Upgraded python3-3.5.2-1.fc26.x86_64                            @rawhide/25
Upgrade          3.5.2-3.fc26.x86_64                            @rawhide

Comment 1 Tony Asleson 2016-09-19 20:45:32 UTC
This was caused by a previous fix to correct return types.  This particular issue was not caused by unit test as the unit test was mainly doing blocking API calls and this bug only happens when a job object is created on a LV create operation.  Specific unit test added and the overall unit test has been changed to test both blocking and non-blocking API calls.

Fixed upstream with:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=ac2fc7a366d0e1e5b23115b34b7773eaf7334076

Comment 2 Vratislav Podzimek 2016-09-26 14:00:00 UTC
(In reply to Tony Asleson from comment #1)
> This was caused by a previous fix to correct return types.  This particular
> issue was not caused by unit test as the unit test was mainly doing blocking
> API calls and this bug only happens when a job object is created on a LV
> create operation.  Specific unit test added and the overall unit test has
> been changed to test both blocking and non-blocking API calls.
> 
> Fixed upstream with:
> 
> https://git.fedorahosted.org/cgit/lvm2.git/commit/
> ?id=ac2fc7a366d0e1e5b23115b34b7773eaf7334076

Looks good to me, thanks!


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