Bug 1687712
Summary: | blockCopy fail with bogus error: "TypeError: block params must be a dictionary" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Peter Krempa <pkrempa> |
Component: | libvirt-python | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | lcheng |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.1 | CC: | berrange, dyuan, extras-qa, jdenemar, jferlan, knoel, nsoffer, pkrempa, veillard, weizhan, xuzhang, yalzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | 8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-python-5.0.0-4.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1687114 | Environment: | |
Last Closed: | 2019-08-07 10:41:10 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: | |
Embargoed: | |||
Bug Depends On: | 1687114 | ||
Bug Blocks: |
Description
Peter Krempa
2019-03-12 08:20:54 UTC
I can reproduce this issue on python3-libvirt-5.0.0-3.module+el8+2836+c71eecaf.x86_64.
Steps to reproduce:
# python
Python 3.6.8 (default, Jan 11 2019, 02:17:16)
[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.open()
>>> dom = conn.lookupByName('test')
>>> diskxml = "<disk><source file='/tmp/test-api-blockcopy.img'/></disk>"
>>> dom.blockCopy('vda', diskxml, libvirt.VIR_DOMAIN_BLOCK_COPY_SHALLOW)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/site-packages/libvirt.py", line 728, in blockCopy
ret = libvirtmod.virDomainBlockCopy(self._o, disk, destxml, params, flags)
TypeError: block params must be a dictionary
Verified on python3-libvirt-5.0.0-4.module+el8.0.1+3317+6e0079ab.x86_64. The result is expected. Move to VERIFIED. # python Python 3.6.8 (default, Jan 11 2019, 02:17:16) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import libvirt >>> conn = libvirt.open() >>> dom = conn.lookupByName('test') >>> domxml = dom.XMLDesc(0) >>> diskxml = "<disk><source file='/tmp/test-api-blockcopy.img'/></disk>" >>> dom.blockCopy('vda', diskxml, None, libvirt.VIR_DOMAIN_BLOCK_COPY_SHALLOW) 0 >>> dom.destroy() 0 >>> dom = conn.createXML(domxml, 0) >>> dom.blockCopy('vda', diskxml, {'bandwidth': 2000}, libvirt.VIR_DOMAIN_BLOCK_COPY_SHALLOW) 0 >>> dom.destroy() 0 >>> dom = conn.createXML(domxml, 0) >>> dom.blockCopy('vda', diskxml, {}, libvirt.VIR_DOMAIN_BLOCK_COPY_SHALLOW) 0 >>> dom.blockCopy('vda', diskxml, libvirt.VIR_DOMAIN_BLOCK_COPY_SHALLOW) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.6/site-packages/libvirt.py", line 728, in blockCopy ret = libvirtmod.virDomainBlockCopy(self._o, disk, destxml, params, flags) TypeError: block params must be a dictionary Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2395 |