Bug 1196067
| Summary: | Rebuild libvirt python bindings for COPY_DEV flag | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Kurik <jkurik> |
| Component: | libvirt-python | Assignee: | Jiri Denemark <jdenemar> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 7.1 | CC: | alitke, amureini, bazulay, bhamrick, cmestreg, cww, eblake, ecohen, fromani, gklein, honzhang, iheim, jdenemar, jherrman, kgoldbla, lpeer, lsurette, michele, mjenner, mkalinin, nsoffer, ogofen, pkrempa, pm-eus, rbalakri, rlocke, scohen, sherold, shyu, vanhoof, virt-bugs, yeylon, ylavi |
| Target Milestone: | rc | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-python-1.2.8-7.el7_1.1 | Doc Type: | Bug Fix |
| Doc Text: |
The block copy operation has previously been adjusted to change the disk type of the copied disk to "file". However, using block copy for moving block-based storage thus converted the new target to an incorrect type. Consequently, if a virtual disk was backed by a block device rather than a file, libvirt did not report the allocation information necessary to track a thin-provisioned volume. This update introduces a libvirt flag that makes it possible to specify that the target will be treated as a block device. As a result, users can now perform a block copy to a block target correctly.
|
Story Points: | --- |
| Clone Of: | 1195848 | Environment: | |
| Last Closed: | 2015-03-06 13:01:30 UTC | Type: | --- |
| 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: | 1195848 | ||
| Bug Blocks: | 1176673 | ||
|
Description
Jan Kurik
2015-02-25 09:06:42 UTC
Verify it as follows. The result is expected. Move its status to VERIFIED.
# rpm -q libvirt libvirt-python
libvirt-1.2.8-16.el7_1.1.x86_64
libvirt-python-1.2.8-7.el7_1.1.x86_64
# virsh list --transient
Id Name State
----------------------------------------------------
15 rh7 running
# virsh dumpxml rh7|grep disk -A8
<disk type='block' device='disk'>
<driver name='qemu' type='qcow2'/>
<source dev='/dev/vg01/lv03'/>
<backingStore type='block' index='1'>
<format type='qcow2'/>
<source dev='/dev/vg01/lv05'/>
<backingStore/>
</backingStore>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
# python -c "import libvirt; print libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY_DEV"
32
# cat blockcopy.py
import libvirt
import sys
con = libvirt.open()
domain = con.lookupByName(sys.argv[1])
domain.blockRebase( "vda" , "/dev/vg01/lv02" , 10 , libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY|libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY_DEV)
# python blockcopy.py rh7
# virsh dumpxml rh7|grep disk -A20
<disk type='block' device='disk'>
<driver name='qemu' type='qcow2'/>
<source dev='/dev/vg01/lv03'/>
<backingStore type='block' index='1'>
<format type='qcow2'/>
<source dev='/dev/vg01/lv05'/>
<backingStore/>
</backingStore>
<mirror type='block' job='copy' ready='yes'>
<format type='qcow2'/>
<source dev='/dev/vg01/lv02'/>
</mirror>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
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://rhn.redhat.com/errata/RHBA-2015-0646.html |