Nova-compute and sparse lvm volumes does not work as expected

Bug #1591084 reported by Denis Ipatov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Won't Fix
Medium
Denis Ipatov

Bug Description

Detailed bug description:

We use lvm backed storage on compute nodes using settings:

images_type=lvm
images_volume_group=vm

We want to switch into sparse volumes with 'sparse_logical_volumes = True' setting.
If we use just sparse volumes on existing VG, then we have an error.

Steps to reproduce:

add the following lines in /etc/nova/nova.conf or /etc/nova/nova-compute.conf on a compute node.

[libvirt]
images_type=lvm
images_volume_group=vm
sparse_logical_volumes = True

restart nova-compute service.

Expected results:
Instances will be created sparse logical volumes in LVM group vm.

Actual result:
nova show <is>
http://paste.openstack.org/show/510464/

Log files:
http://paste.openstack.org/show/510466/

Reproducibility:
MOS 7.0

The reason of the error:
Logical volume has been created with 64 MB (as described preallocated size)
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/storage/lvm.py#L62

# lvs
  /dev/vm/27a4f366-92fb-4991-a364-51c9d363c88c_disk: read failed after 0 of 4096 at 21474770944: Input/output error
  /dev/vm/27a4f366-92fb-4991-a364-51c9d363c88c_disk: read failed after 0 of 4096 at 21474828288: Input/output error
  /dev/vm/27a4f366-92fb-4991-a364-51c9d363c88c_disk: read failed after 0 of 4096 at 0: Input/output error
  /dev/vm/27a4f366-92fb-4991-a364-51c9d363c88c_disk: read failed after 0 of 4096 at 4096: Input/output error
  LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
  root os -wi-ao--- 442.52g
  swap os -wi-ao--- 4.00g
  27a4f366-92fb-4991-a364-51c9d363c88c_disk vm swi-I-s-- 64.00m [27a4f366-92fb-4991-a364-51c9d363c88c_disk_vorigin] 100.00

LVM documentation shows that thing volumes should be created by the command:
It is also possible to create both the thin pool as well as the logical volume inside the thin pool in one command:

lvcreate -T <volume group>/<thin_pool> -V <size> -L <preallocated size> -n <name>

Nova-compute creates sparse disk using the following command:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/storage/lvm.py#L75-L76

Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

version

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Dina Belova (dbelova)
Changed in mos:
milestone: none → 7.0-updates
assignee: nobody → MOS Nova (mos-nova)
status: New → Confirmed
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Denis, we do not support settings images_type to LVM in MOS/Fuel, we don't test it.

Please help us to understand the importance here. I'd propose to keep this as Medium and, thus, not applicable for < 10.0. If you disagree, please start a formal escalation.

Changed in mos:
assignee: MOS Nova (mos-nova) → Denis Ipatov (dipatov)
status: Confirmed → Incomplete
importance: High → Medium
Revision history for this message
Sergey Kolekonov (skolekonov) wrote :

Moving to invalid as there were no comments during last month

Changed in mos:
status: Incomplete → Invalid
Revision history for this message
Pavel Kholkin (pkholkin) wrote :

looks like even a wishlist, moving to won't fix, because there is nothing incorrect here, but nobody is interested in this and for now.

Changed in mos:
status: Invalid → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.