Bug 818449 - mirroring in QMP transaction with "full"=false is treated as "full"=true
mirroring in QMP transaction with "full"=false is treated as "full"=true
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On:
Blocks: 806280
  Show dependency treegraph
 
Reported: 2012-05-03 02:33 EDT by Shaolong Hu
Modified: 2012-07-12 04:39 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-12 04:39:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shaolong Hu 2012-05-03 02:33:33 EDT
Description of problem:
------------------------
mirroring in QMP transaction with "full"=false is treated as "full"=true


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
qemu-kvm-rhev-0.12.1.2-2.282.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.288.el6.x86_64


How reproducible:
-----------------
100%


Steps to Reproduce:
--------------------
1.start guest with base:

{ "execute": "transaction",
     "arguments": { "actions": [
         { 'type': 'blockdev-snapshot-sync', 'data' : { "device":
"drive-virtio-disk0",
                                         "snapshot-file": "/root/sn1",
                                         "format": "qcow2" } },
         { 'type': '__com.redhat_drive-mirror', 'data' : { "device":
"drive-virtio-disk0",
                                         "target": "/root/sn2",
                                         "mode": "absolute-paths",
                                         "format": "qcow2",
                                         "full": false } } ] } }

2. in step 1, i specify "full"=false, but after step 1, base is copied to sn2

3. 
[root@shu ~]# qemu-img info sn1
image: sn1
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 31M
cluster_size: 65536
backing file: win7-64-virtio.qcow2 (actual path: win7-64-virtio.qcow2)

[root@shu ~]# qemu-img info sn2
image: sn2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 7.6G
cluster_size: 65536

[root@shu ~]# qemu-img info win7-64-virtio.qcow2 
image: win7-64-virtio.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 7.4G
cluster_size: 65536

here win7-64-virtio.qcow2 is the base.


Expected results:
------------------
only sn1 is copied to sn2.
Comment 2 Paolo Bonzini 2012-05-03 05:37:54 EDT
The issue here is that drive-mirror uses the disk at the *beginning* of the transaction as the source, rather than the disk at the current point of the transaction.

It can be fixed, but libvirt is not using the transaction functionality and it will not be included in the upstream code. For this reason a WONTFIX would be nice if libvirt and vdsm guys agree. Federico/Eric, any opinion?
Comment 3 Eric Blake 2012-05-03 09:07:15 EDT
I'm agreed that a WONTFIX for 6.3 is appropriate; streaming mirror without transaction solves the original design problem of storage migration as needed by vdsm, and libvirt doesn't expose snapshot+mirror transactions (I wrote the patches for that, but they were not applied), so the only other way to exercise this code path would be by unsupported raw monitor commands.
Comment 4 Paolo Bonzini 2012-05-07 10:59:43 EDT
Moved to 6.4, waiting for Federico's ack to WONTFIX it.
Comment 6 RHEL Product and Program Management 2012-07-10 03:16:27 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 7 RHEL Product and Program Management 2012-07-10 22:06:59 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 8 Paolo Bonzini 2012-07-12 04:39:50 EDT
> libvirt is not using the transaction functionality and it will not be included 
> in the upstream code

Closing, the mirror transaction functionality is effectively dead code.

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