config drive not created when booting from volume

Bug #1124441 reported by Boris Deschenes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Nikola Đipanov

Bug Description

When booting from volume with a config drive, libvirt fails to instantiate because the disk.config is never created in the instance directory. This was recently broken.

This could be related to bug 984996 (instance directory not created) but I'm not sure

I boot a VM from volume using this:

nova boot --config-drive=true --block-device-mapping vda=<VOLUME ID HERE>:::0 --flavor=1 --nic net-id=38278b90-9f80-44ec-b2a5-dac6a7066a5e autoBFV

This will generate the following error:

2013-02-13 14:29:20.831 DEBUG nova.utils [req-ab6b48d5-c2e6-43c4-970c-f65b16acfda5 8636766bc6b342539a9c1b0e3e0c24cc 24e6c25ee7bf4f5bbcd19c53bbe84f37] Result was 0 execute /usr/lib/python2.7/dist-packages/nova/utils.py:231
2013-02-13 14:29:20.833 DEBUG nova.utils [req-ab6b48d5-c2e6-43c4-970c-f65b16acfda5 8636766bc6b342539a9c1b0e3e0c24cc 24e6c25ee7bf4f5bbcd19c53bbe84f37] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/rootwrap.conf iptables-restore -c execute /usr/lib/python2.7/dist-packages/nova/utils.py:207
2013-02-13 14:29:20.909 DEBUG nova.utils [req-ab6b48d5-c2e6-43c4-970c-f65b16acfda5 8636766bc6b342539a9c1b0e3e0c24cc 24e6c25ee7bf4f5bbcd19c53bbe84f37] Result was 0 execute /usr/lib/python2.7/dist-packages/nova/utils.py:231
2013-02-13 14:29:20.910 DEBUG nova.network.linux_net [req-ab6b48d5-c2e6-43c4-970c-f65b16acfda5 8636766bc6b342539a9c1b0e3e0c24cc 24e6c25ee7bf4f5bbcd19c53bbe84f37] IPTablesManager.apply completed with success _apply /usr/lib/python2.7/dist-packages/nova/network/linux_net.py:391
2013-02-13 14:29:20.911 DEBUG nova.openstack.common.lockutils [req-ab6b48d5-c2e6-43c4-970c-f65b16acfda5 8636766bc6b342539a9c1b0e3e0c24cc 24e6c25ee7bf4f5bbcd19c53bbe84f37] Released file lock "iptables" at /var/lock/nova/nova-iptables for method "_apply"... inner /usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py:235
2013-02-13 14:29:22.607 ERROR nova.compute.manager [req-ab6b48d5-c2e6-43c4-970c-f65b16acfda5 8636766bc6b342539a9c1b0e3e0c24cc 24e6c25ee7bf4f5bbcd19c53bbe84f37] [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] Instance failed to spawn
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] Traceback (most recent call last):
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 985, in _spawn
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] block_device_info)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1205, in spawn
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] block_device_info)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2087, in _create_domain_and_network
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] domain = self._create_domain(xml, instance=instance)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2048, in _create_domain
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] domain.createWithFlags(launch_flags)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 187, in doit
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] result = proxy_call(self._autowrap, f, *args, **kwargs)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 147, in proxy_call
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] rv = execute(f,*args,**kwargs)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 76, in tworker
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] rv = meth(*args,**kwargs)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] File "/usr/lib/python2.7/dist-packages/libvirt.py", line 650, in createWithFlags
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self)
2013-02-13 14:29:22.607 3204 TRACE nova.compute.manager [instance: ab87f0d0-15bf-4c23-b504-227ba274b5e6] libvirtError: Unable to allow access for disk path /var/lib/nova/instances/instance-0000002d/disk.config: No such file or directory

Changed in nova:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Boris Deschenes (boris-michel-deschenes) wrote :

This is definitely related to bug 1131913, the problem is the libvirt driver not calling the _create_image function when booting from volume (because there is no image metadata).

Could you link this bug with 1131913 please

Changed in nova:
milestone: none → grizzly-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23818

Changed in nova:
assignee: nobody → Nikola Đipanov (ndipanov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23818
Committed: http://github.com/openstack/nova/commit/3133096f2bf2c8de04c70c3f3209d727a4c8cfb3
Submitter: Jenkins
Branch: master

commit 3133096f2bf2c8de04c70c3f3209d727a4c8cfb3
Author: Nikola Dipanov <email address hidden>
Date: Thu Mar 7 15:54:07 2013 +0100

    Libvirt driver create images even without meta

    This patch allows the libvirt driver to call _create_image and
    create instance directory and other needed images even when there is no
    image metadata specified.

    As an added bonus, this patch refactors the code of _create_image
    method a bit to make it more clear to the reader when some of the images
    will and will not be created, especially with regard to booting from
    volume.

    Fixes bug: 1124441
    Fixes bug: 1131913
    Fixes bug: 1123274

    blueprint: improve-boot-from-volume

    Change-Id: I5a028dc0585876d35be4fb86df3a423d89e054ee

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.