Bug 818876

Summary: streaming to stable iscsi path names (with colons) fails to close backing file
Product: Red Hat Enterprise Linux 6 Reporter: Shaolong Hu <shu>
Component: qemu-kvmAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, areis, bsarathy, dyasny, juzhang, michen, mkenneth, pbonzini, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.292.el6 Doc Type: Bug Fix
Doc Text:
No Documentation Needed
Story Points: ---
Clone Of:
: 819974 (view as bug list) Environment:
Last Closed: 2012-06-20 11:47:24 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:    
Bug Blocks: 582475, 806280, 818891    

Description Shaolong Hu 2012-05-04 09:03:54 UTC
Description of problem:
------------------------
Streaming fails to close backing file when use iscsi.


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


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


Steps to Reproduce:
--------------------
1.boot guest with:

-drive file=/dev/disk/by-path/ip-10.66.9.64\:3260-iscsi-iqn.2001-04.com.example\:storage.disk1.amiens.sys1.xyz-lun-1,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0

2.block stream this drive to another iscsi lum:

(qemu) snapshot_blkdev drive-virtio-disk0 /dev/disk/by-path/ip-10.66.9.64:3260-iscsi-iqn.2001-04.com.example:storage.disk1.amiens.sys1.xyz-lun-2 qcow2


3.after block job finishes:

(qemu) info block-jobs
No active jobs 
(qemu) info block
drive-virtio-disk0: removable=0 io-status=ok file=/dev/disk/by-path/ip-10.66.9.64:3260-iscsi-iqn.2001-04.com.example:storage.disk1.amiens.sys1.xyz-lun-2 backing_file=/dev/disk/by-path/ip-10.66.9.64:3260-iscsi-iqn.2001-04.com.example:storage.disk1.amiens.sys1.xyz-lun-1 ro=0 drv=qcow2 encrypted=0

4. /dev/sdb and /dev/sdc is the lun 1 and lun 2

[root@shu ~]# lsof -a -p 31435 | grep dev
qemu-kvm 31435 root  DEL    REG                0,4               234787 /dev/zero
qemu-kvm 31435 root  DEL    REG                0,4               234768 /dev/zero
qemu-kvm 31435 root    0u   CHR              136,0         0t0        3 /dev/pts/0
qemu-kvm 31435 root    1u   CHR              136,0         0t0        3 /dev/pts/0
qemu-kvm 31435 root    2u   CHR              136,0         0t0        3 /dev/pts/0
qemu-kvm 31435 root    7u   CHR             10,232         0t0    11828 /dev/kvm
qemu-kvm 31435 root   11u   CHR             10,200         0t0     9192 /dev/net/tun
qemu-kvm 31435 root   12u   BLK               8,16 0x1c0000000   234302 /dev/sdb
qemu-kvm 31435 root   24u   BLK               8,32 0x1c0000000   234311 /dev/sdc


Additional info:
----------------
if in step 2, streaming to regular file, this won't happen.

Comment 1 Shaolong Hu 2012-05-04 09:06:25 UTC
in step 2, there is one more command:
(qemu) block-stream drive-virtio-disk0

And i have to confirm whether this happens with mirroring.

Comment 3 Shaolong Hu 2012-05-04 10:01:38 UTC
mirroring suffers from the problem, but worse, open a new one to track it:
Bug 818891 - mirroring fails with iscsi

Comment 4 Paolo Bonzini 2012-05-04 12:32:28 UTC
Please retry this with QMP.  It looks like bdrv_change_backing_file failed (see "info block" output), so close_unused_images was not executed.

Comment 11 Ademar Reis 2012-05-07 18:43:30 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation Needed

Comment 13 Ademar Reis 2012-05-08 14:26:49 UTC
*** Bug 818891 has been marked as a duplicate of this bug. ***

Comment 17 Shaolong Hu 2012-05-11 05:09:04 UTC
Test with steps in comment 7 and steps in bug Bug 818891, this problem has gone in both streaming and mirroring, fixed.

Verified with qemu-kvm-rhev-0.12.1.2-2.292.el6.x86_64

Comment 19 errata-xmlrpc 2012-06-20 11:47:24 UTC
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.

http://rhn.redhat.com/errata/RHBA-2012-0746.html