Bug 609104 - lv creation doesn't fail if requested size is larger than available vg space
Summary: lv creation doesn't fail if requested size is larger than available vg space
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 17
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-29 12:47 UTC by Kamil Páral
Modified: 2012-11-15 02:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-15 02:45:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kamil Páral 2010-06-29 12:47:18 UTC
Description of problem:
I use LVM as storage pool. When using virt-install and specifying inexistent disk with required size defined, virt-install crashes if the size is bigger than available space in volume group.

Example:

# vgs
  VG   #PV #LV #SN Attr   VSize  VFree 
  vg     1   4   0 wz--n- 80.07g 28.11g

# virt-install --name Test --ram 512 --disk /dev/vg/Test,size=30 --location http://download.englab.brq.redhat.com/pub/fedora/linux/releases/13/Fedora/x86_64/os --arch=x86_64 --extra-args "console=ttyS0 serial lang=en keymap=us ksdevice=link ks=http://kparal.usersys.redhat.com:8000/atc-f13.ks ip=dhcp ipv6=auto vnc" --nographics


Starting install...
Retrieving file .treeinfo...                                                                                                                              | 2.4 kB     00:00 ... 
Retrieving file vmlinuz...                                                                                                                                | 6.7 MB     00:00 ... 
Retrieving file initrd.img...                                                                                                                             |  57 MB     00:00 ... 
ERROR    cannot open file '/dev/vg/Test': No such file or directory
Domain installation does not appear to have been
 successful.  If it was, you can restart your domain
 by running 'virsh start Test'; otherwise, please
 restart your installation.
ERROR    cannot open file '/dev/vg/Test': No such file or directory
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 1054, in <module>
    main()
  File "/usr/sbin/virt-install", line 936, in main
    start_time, guest.start_install)
  File "/usr/sbin/virt-install", line 978, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 981, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1046, in _do_install
    "install")
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1017, in _create_guest
    dom = self.conn.createLinux(start_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1147, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: cannot open file '/dev/vg/Test': No such file or directory



Version-Release number of selected component (if applicable):
libvirt-0.7.7-4.fc13.x86_64
libvirt-client-0.7.7-4.fc13.x86_64
libvirt-python-0.7.7-4.fc13.x86_64
python-virtinst-0.500.3-1.fc13.noarch
virt-manager-0.8.4-1.fc13.noarch
virt-top-1.0.4-3.fc13.x86_64
virt-viewer-0.2.1-1.fc13.x86_64

How reproducible:
always

Steps to Reproduce:
1. Use LVM as storage pool.
2. Use virt-install and create inexistent --disk with size bigger than available space.
3. See the fireworks.
  
Actual results:
virt-install crashes

Expected results:
virt-install informs me that there is not enough space

Additional info:

Comment 1 Bug Zapper 2011-06-01 15:16:35 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Kamil Páral 2011-06-01 18:31:11 UTC
This seems to be much better in Fedora 14:


# virt-install --name Foo --ram 512 --disk /dev/vg/Foo,size=80 --location http://download.englab.brq.redhat.com/pub/fedora/linux/releases/13/Fedora/x86_64/os --arch=x86_64 --extra-args "console=ttyS0 serial lang=en keymap=us ksdevice=link ks=http://kparal.usersys.redhat.com:8000/atc-f13.ks ip=dhcp ipv6=auto vnc" --nographics

Starting install...
Retrieving file .treeinfo...                                                                                                                                                            | 2.4 kB     00:00 ... 
Retrieving file vmlinuz...                                                                                                                                                              | 6.7 MB     00:00 ... 
Retrieving file initrd.img...                                                                                                                                                           |  57 MB     00:00 ... 
ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/16
qemu: could not open disk image /dev/vg/Foo: No such file or directory

Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start Foo
otherwise, please restart your installation.



However, the error message could still be much clearer - saying that there was not enough space to create the disk image.

libvirt-0.8.3-9.fc14.x86_64
libvirt-client-0.8.3-9.fc14.x86_64
libvirt-python-0.8.3-9.fc14.x86_64
python-virtinst-0.500.6-1.fc14.noarch
virt-manager-0.8.7-2.fc14.noarch
virt-top-1.0.4-3.fc13.x86_64
virt-viewer-0.2.1-1.fc13.x86_64

Comment 3 Fedora Admin XMLRPC Client 2011-09-22 17:56:55 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2011-09-22 18:00:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora Admin XMLRPC Client 2011-11-30 19:56:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2011-11-30 19:57:54 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Admin XMLRPC Client 2011-11-30 20:02:42 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora Admin XMLRPC Client 2011-11-30 20:03:34 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Cole Robinson 2012-01-24 21:56:00 UTC
F14 is EOL, please reopen if this is still relevant in a more recent fedora.

Comment 10 Kamil Páral 2012-01-25 09:57:28 UTC
The same problem as in comment 2:


# virt-install --name Foo --ram 1024 --disk /dev/vg/Foo,size=80 --location http://download.englab.brq.redhat.com/pub/fedora/linux/releases/16/Fedora/x86_64/os --arch=x86_64 --extra-args "console=ttyS0 serial lang=en keymap=us ksdevice=link ks=http://kparal.usersys.redhat.com:8000/f16-minimal.ks ip=dhcp ipv6=auto vnc" --nographics

Starting install...
Retrieving file .treeinfo...                                                                                                                                    | 1.7 kB     00:00 ... 
Retrieving file vmlinuz...                                                                                                                                      | 7.9 MB     00:00 ... 
Retrieving file initrd.img...                                                                                                                                   | 259 MB     00:03 ... 
ERROR    Unable to allow access for disk path /dev/vg/foo: No such file or directory
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start Foo
otherwise, please restart your installation.


virt-viewer-0.4.1-3.fc16.x86_64
virt-manager-common-0.9.0-7.fc16.noarch
libvirt-client-0.9.6-4.fc16.x86_64
virt-manager-0.9.0-7.fc16.noarch
libvirt-0.9.6-4.fc16.x86_64
virt-top-1.0.6-1.fc16.x86_64
libvirt-python-0.9.6-4.fc16.x86_64
python-virtinst-0.600.0-5.fc16.noarch

Comment 11 Cole Robinson 2012-10-20 17:40:57 UTC
The error reporting here should be fixed by

commit 01df6f2bff98d8fc68350ab90c212780ef9db67a
Author: Cole Robinson <crobinso>
Date:   Tue Oct 16 20:25:41 2012 -0400

    storage: lvm: Don't overwrite lvcreate errors

Comment 12 Fedora Update System 2012-10-27 22:15:29 UTC
libvirt-0.9.11.7-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/libvirt-0.9.11.7-1.fc17

Comment 13 Fedora Update System 2012-10-30 03:51:12 UTC
Package libvirt-0.9.11.7-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-0.9.11.7-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17206/libvirt-0.9.11.7-1.fc17
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2012-11-15 02:45:30 UTC
libvirt-0.9.11.7-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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