Bug 1072302

Summary: RHEV: Cannot start VMs that have more than 23 snapshots - clone for rhel/rhev split
Product: Red Hat Enterprise Linux 6 Reporter: Jan Kurik <jkurik>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.5CC: acathrow, areis, bazulay, bsarathy, chayang, famz, fsimonce, gwatson, iheim, jcody, jherrman, jkurik, juzhang, knoel, kwolf, lpeer, michen, mkalinin, mkenneth, mrezanin, pbonzini, pm-eus, qzhang, sgordon, shu, tlavigne, virt-maint, yeylon
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-0.12.1.2-2.415.el6_5.6 Doc Type: Bug Fix
Doc Text:
Previously, the number of characters in the file name strings for virtual machine (VM) images was limited. Because repeated creation of VM image snapshots gradually increases the file name string size, this eventually resulted in either of the following problems when the size limit was reached: creating an image snapshot failed to be executed or the VM did not successfully boot. This update fixes the handling of file names so that long file names are now supported, and the mentioned problems no longer occur.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-25 12:27:23 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: 1067576, 1072339, 1113583    
Bug Blocks:    

Description Jan Kurik 2014-03-04 10:47:47 UTC
This bug has been copied from bug #1067576 and has been proposed
to be backported to 6.5 z-stream (EUS).

Comment 3 Shaolong Hu 2014-03-05 06:26:50 UTC
Reproduced on qemu-kvm-rhev-0.12.1.2-2.415.el6_5.5.x86_64:

run test script from:
https://bugzilla.redhat.com/show_bug.cgi?id=1067576#c28

[root@ibm-x3650m3-04 ~]# ./test.sh 
Formatting 'base.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 
Performing live snapshot test
-----------------------------
Waiting to connect to qmp socket...
./test.sh: connect: Connection refused
./test.sh: line 44: /dev/tcp/localhost/44444: Connection refused
connected!
snapshot-0: success!
snapshot-1: success!
snapshot-2: success!
snapshot-3: success!
snapshot-4: success!
snapshot-5: success!
...
snapshot-25: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
snapshot-26: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
snapshot-27: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
snapshot-28: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
...
snapshot-79: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)

Performing qemu-img snapshot test
---------------------------------
snapshot-0: success!
snapshot-1: success!
snapshot-2: success!
snapshot-3: success!
snapshot-4: success!
...
snapshot-24: success!
snapshot-25: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
snapshot-26: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
snapshot-27: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
snapshot-28: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)
...
snapshot-79: failed! (see this-is-a-test-dir-for-snapshots-2844/output.log)

Killing qemu process (2848)....
done, left directory this-is-a-test-dir-for-snapshots-2844 intact


Verified on qemu-kvm-rhev-0.12.1.2-2.415.el6_5.6.x86_64:

run same script, all 80 snapshots success with both qemu-kvm and qemu-img.

Comment 4 Qunfang Zhang 2014-03-06 03:16:44 UTC
Hello, Mirek

Do you know when could we create the qemu-kvm-rhev errata for the bug? And also the twins qemu-kvm errata for bug 1071740.

Thanks,
Qunfang

Comment 5 Miroslav Rezanina 2014-03-06 05:04:05 UTC
Hi Qunfang,
I'm waiting for RHEL 6.5.z errata to be shipped so therre won't be two erratas for the same product-version. I expect it to happen today.

Comment 6 Qunfang Zhang 2014-03-06 05:16:14 UTC
(In reply to Miroslav Rezanina from comment #5)
> Hi Qunfang,
> I'm waiting for RHEL 6.5.z errata to be shipped so therre won't be two
> erratas for the same product-version. I expect it to happen today.

Hi, Mirek

Okay and thanks. I mean one erratum for RHEL qemu-kvm and another one for RHEV-H qemu-kvm-rhev like we did in the past. 


Thanks,
Qunfang

Comment 8 Chao Yang 2014-03-11 09:49:50 UTC
Reproduced with qemu-kvm-rhev-0.12.1.2-2.415.el6_5.5.x86_64. 

Packages used:
qemu-kvm-rhev-0.12.1.2-2.415.el6_5.5.x86_64
libvirt-0.10.2-29.el6_5.5.x86_64
vdsm-4.13.2-0.11.el6ev.x86_64

Steps:
1)  Create a new VM with a single 1gb disk (or any size)
2)  Keep creating snapshots.

Actual Result:
Counting from 1st snapshot, when creating 24th snapshot, it failed on:
...
7b4d785c-272c-41ac-b807-2dba3bef14b2::DEBUG::2014-03-11 16:54:05,278::volume::1058::Storage.Misc.excCmd::(createVolume) FAILED: <err> = '/rhev/data-center/2fa4f0cf-69ca-410c-9046-dda14854f535/cd1ce1b9-cfaf-4bc1-9564-16c9d3833dbb/images/dce65faf-5bb1-4700-8832-1f8914d3ee92/30e7a762-c799-4961-a407-f8530469e0da: error while creating qcow2: No such file or directory\n'; <rc> = 1
7b4d785c-272c-41ac-b807-2dba3bef14b2::ERROR::2014-03-11 16:54:05,283::volume::286::Storage.Volume::(clone) Volume.clone: can't clone: /rhev/data-center/2fa4f0cf-69ca-410c-9046-dda14854f535/cd1ce1b9-cfaf-4bc1-9564-16c9d3833dbb/images/dce65faf-5bb1-4700-8832-1f8914d3ee92/1dc7a771-836b-404a-941f-34ba5e7f5442 to /rhev/data-center/2fa4f0cf-69ca-410c-9046-dda14854f535/cd1ce1b9-cfaf-4bc1-9564-16c9d3833dbb/images/dce65faf-5bb1-4700-8832-1f8914d3ee92/30e7a762-c799-4961-a407-f8530469e0da
7b4d785c-272c-41ac-b807-2dba3bef14b2::ERROR::2014-03-11 16:54:05,283::volume::508::Storage.Volume::(create) Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/volume.py", line 466, in create
    srcVolUUID, imgPath, volPath)
  File "/usr/share/vdsm/storage/fileVolume.py", line 160, in _create
    volParent.clone(imgPath, volUUID, volFormat, preallocate)
  File "/usr/share/vdsm/storage/volume.py", line 287, in clone
    raise se.CannotCloneVolume(self.volumePath, dst_path, str(e))
CannotCloneVolume: Cannot clone volume: 'src=/rhev/data-center/2fa4f0cf-69ca-410c-9046-dda14854f535/cd1ce1b9-cfaf-4bc1-9564-16c9d3833dbb/images/dce65faf-5bb1-4700-8832-1f8914d3ee92/1dc7a771-836b-404a-941f-34ba5e7f5442, dst=/rhev/data-center/2fa4f0cf-69ca-410c-9046-dda14854f535/cd1ce1b9-cfaf-4bc1-9564-16c9d3833dbb/images/dce65faf-5bb1-4700-8832-1f8914d3ee92/30e7a762-c799-4961-a407-f8530469e0da: Error creating a new volume: (["Formatting \'/rhev/data-center/2fa4f0cf-69ca-410c-9046-dda14854f535/cd1ce1b9-cfaf-4bc1-9564-16c9d3833dbb/images/dce65faf-5bb1-4700-8832-1f8914d3ee92/30e7a762-c799-4961-a407-f8530469e0da\', fmt=qcow2 size=1073741824 backing_file=\'../dce65faf-5bb1-4700-8832-1f8914d3ee92/1dc7a771-836b-404a-941f-34ba5e7f5442\' backing_fmt=\'qcow2\' encryption=off cluster_size=65536 "],)'


Verified on qemu-kvm-rhev-0.12.1.2-2.415.el6_5.6.x86_64 with same steps. I can continue to create snapshots up to 50 successfully. 

So this issue has fixed. Moving to VERIFIED.

Comment 10 errata-xmlrpc 2014-03-25 12:27:23 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-2014-0329.html