Unable to create VM with ephemeral block device in lvm

Bug #1204424 reported by ReneMuhl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Vladik Romanovsky

Bug Description

Hey,

I am running Xubuntu 12.04.2 and I installed OpenStack Grizzly through Ubuntu Cloud Archive.
I configured nova-compute to use LVM as instance storage backend and I put these two lines in nova.conf.

libvirt_images_type=lvm
libvirt_images_volume_group=nova

When I am trying to boot a VM with a self-created flavor like:
nova flavor-create --ephemeral 10 m1.myWithEphSmall 7 4096 20 2
(with ephemeral block device != 0) the VM doesn't boot.

All VM with pre-defined flavors works fine.

here the /var/log/nova/nova-compute.log:
http://paste.openstack.org/show/41529/

some other infos:
http://paste.openstack.org/show/41533/

nova.conf:
http://paste.openstack.org/show/41534/

many thanks...

Tags: libvirt
tags: added: libvirt
Changed in nova:
assignee: nobody → Vladik Romanovsky (vladik-romanovsky)
Changed in nova:
status: New → In Progress
Changed in nova:
assignee: Vladik Romanovsky (vladik-romanovsky) → nobody
assignee: nobody → Armando Migliaccio (armando-migliaccio)
importance: Undecided → Medium
importance: Medium → Undecided
assignee: Armando Migliaccio (armando-migliaccio) → nobody
assignee: nobody → Vladik Romanovsky (vladik-romanovsky)
Revision history for this message
Vladik Romanovsky (vladik-romanovsky) wrote :
Revision history for this message
ReneMuhl (r-muhl) wrote :

Should I try it or what is the standard procedure?

regards

Revision history for this message
ReneMuhl (r-muhl) wrote :

If so, how? ;)
replacing all files?

Revision history for this message
Vladik Romanovsky (vladik-romanovsky) wrote :

Hi,

Sure, I'll be happy if you will try. However, the fix is not distribution specific, since the same problem exists in upstream Havana.
The best way is to test it with devstack..
I'll check if I can backport it to Grizzly.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/48362
Committed: http://github.com/openstack/nova/commit/474e48bf1169a24123e92381f45650b29990d3bf
Submitter: Jenkins
Branch: master

commit 474e48bf1169a24123e92381f45650b29990d3bf
Author: Vladik Romanovsky <email address hidden>
Date: Thu Sep 26 16:41:40 2013 -0400

    Fixing ephemeral disk creation.

    The patch addresses 2 scenarios, which occur when
    CONF.default_ephemeral_format was provided:

    1. Creation of ephemeral block devices would fail,
       due to permission issues, during an attempt to format it without sudo,
       in _create_local.
    2. The device/image would be formatted twice, while the final
       filesystem will differ from the one provided in
       CONF.default_ephemeral_format.

    This patch will format only once, relying on the changed
    disk.mkfs command, that takes CONF.default_ephemeral_format
    into consideration.
    It will also run the command as root only for block devices,
    according to the disk_image is_block_dev property.

    Closes-Bug: #1204424
    Change-Id: I2bf7abc982e20eaaf7bca7cd798b4134b76d10a8

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
ReneMuhl (r-muhl) wrote :

Hey, it's me again.
I don't think I will confirm the fix in the future, because I have not the time to do that. I have tried it but without success.
I hope it can be handled by someone else. Sorry.

regards

Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Revision history for this message
Taras (shapovalovts) wrote :

It seems that patch breaks integration with RBD in IceHouse. In particular in _create_ephemeral() this is not called for block devices (and nova fails):

self._create_local(target, ephemeral_size)

So, as far as I understand, when RBD is set as a Nova backend, then ephemeral disk is created on a filesystem, then it is formatted with mkfs and only then then imported to Ceph (effectiveness of such algorithm is a separate issue). So, I see in IceHouse that if I replace

if not is_block_dev:
     self._create_local(target, ephemeral_size)

to just

self._create_local(target, ephemeral_size)

then Nova does not fail.

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.