RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 823362 - vol-create-as should fail when allocate a malformed size image
Summary: vol-create-as should fail when allocate a malformed size image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-21 02:52 UTC by zhpeng
Modified: 2013-09-09 00:03 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.13-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:14:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description zhpeng 2012-05-21 02:52:15 UTC
Description of problem:
vol-create-as should fail when allocate a malformed size image

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.292.el6.x86_64
libvirt-0.9.10-20.el6.x86_64
kernel-2.6.32-270.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1, define and start a nfs pool
virsh # pool-info nfs
Name:           nfs
UUID:           9401f015-e2cb-2cb2-2c05-83ba92c8cb4b
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       98.43 GB       ----------> pool capacity
Allocation:     58.37 GB
Available:      40.06 GB

2,create a malformed size image

virsh # vol-create-as nfs big 10000000000000000000000000000000000000G
error: Malformed size 10000000000000000000000000000000000000G
error: Failed to create vol big
error: cannot extend file '/nfs/big': File too large

virsh # vol-create-as nfs big 100000000000G
error: Malformed size 100000000000G
Vol big created             -------------> This takes a long time and should fail

virsh # vol-info /nfs/big --pool nfs
Name:           big
Type:           file
Capacity:       93.13 GB          ------> wrong size. and this image should not exist
Allocation:     373.63 MB

3, create a over commit image in the pool
virsh # vol-create-as nfs big6 100G
Vol big6 created                     ------------> a long time

virsh # vol-info --pool nfs big6
Name:           big6
Type:           file
Capacity:       100.00 GB           -------> expect
Allocation:     401.18 MB



Actual results:
As Steps

Expected results:
1,virsh command should fail when create a malformed size image.
2,create a normal image in nfs pool with vol-create-as should be faster

Additional info:

Comment 1 Osier Yang 2012-06-05 07:35:22 UTC
(In reply to comment #0)
> Description of problem:
> vol-create-as should fail when allocate a malformed size image
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-rhev-0.12.1.2-2.292.el6.x86_64
> libvirt-0.9.10-20.el6.x86_64
> kernel-2.6.32-270.el6.x86_64
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1, define and start a nfs pool
> virsh # pool-info nfs
> Name:           nfs
> UUID:           9401f015-e2cb-2cb2-2c05-83ba92c8cb4b
> State:          running
> Persistent:     yes
> Autostart:      yes
> Capacity:       98.43 GB       ----------> pool capacity
> Allocation:     58.37 GB
> Available:      40.06 GB
> 
> 2,create a malformed size image
> 
> virsh # vol-create-as nfs big 10000000000000000000000000000000000000G
> error: Malformed size 10000000000000000000000000000000000000G
> error: Failed to create vol big
> error: cannot extend file '/nfs/big': File too large
> 
> virsh # vol-create-as nfs big 100000000000G
> error: Malformed size 100000000000G
> Vol big created             -------------> This takes a long time and should
> fail
> 
> virsh # vol-info /nfs/big --pool nfs
> Name:           big
> Type:           file
> Capacity:       93.13 GB          ------> wrong size. and this image should
> not exist
> Allocation:     373.63 MB
> 
> 3, create a over commit image in the pool
> virsh # vol-create-as nfs big6 100G
> Vol big6 created                     ------------> a long time
> 
> virsh # vol-info --pool nfs big6
> Name:           big6
> Type:           file
> Capacity:       100.00 GB           -------> expect
> Allocation:     401.18 MB
> 
> 
> 
> Actual results:
> As Steps
> 
> Expected results:
> 1,virsh command should fail when create a malformed size image.

This is right requirement.

> 2,create a normal image in nfs pool with vol-create-as should be faster
> 

And this is not, as it's filesystem related, you can't expect libvirt to drive
the filesystem more faster.

Comment 2 Osier Yang 2012-06-05 07:36:14 UTC
commit ee58b581c4b275f06904253285b7ad562dc09745
Author: Osier Yang <jyang>
Date:   Mon Jun 4 17:08:34 2012 +0800

    virsh: Back out if the argument for vol-create-as is malformed

Commit in upstream, move to POST.

Comment 5 Huang Wenlong 2012-07-24 05:30:55 UTC
Verify this bug with 
libvirt-0.9.13-3.el6.x86_64


# virsh vol-create-as netfs big 10000000000000G
error: Malformed size 10000000000000G

[root@intel-q9400-4-2 virsh-rail]# virsh pool-info netfs
Name:           netfs
UUID:           302df04c-6927-e9cd-2719-c7a3a7ed436b
State:          running
Persistent:     no
Autostart:      no
Capacity:       141.89 GiB
Allocation:     99.83 GiB
Available:      42.06 GiB

Comment 6 errata-xmlrpc 2013-02-21 07:14:56 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/RHSA-2013-0276.html


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