xenapi boot from volume is broken after move to ImageMeta object if volume passed in

Bug #1496557 reported by Andrew Laski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Andrew Laski

Bug Description

When a request is made to boot an instance from a volume and a volume is passed in as part of the request, rather than an image to have Nova create a volume from, the image id is not passed down as part of the build request. The boot_meta dict created in compute/api.py does not store an 'id' key/value in the dict so when it eventually gets down to the virt layer and the dict is converted to an object the 'id' attribute can not be accessed. This causes a failure within the xenapi driver.

2015-09-16 13:02:00.481 24755 DEBUG nova.virt.xenapi.vmops [req-14839809--53d088b99b2d dbf01adba9b245369ba32a46d93fdf5f 5930474 - - -] [instance: 897942e0] Updating progress to 10 _update_instance_progress /opt/rackstack/rackstack.381.6/nova/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py:1017
2015-09-16 13:02:00.696 24755 ERROR nova.utils [req-14839809--53d088b99b2d dbf01adba9b245369ba32a46d93fdf5f 5930474 - - -] [instance: 897942e0] Failed to spawn, rolling back
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] Traceback (most recent call last):
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] File "/opt/rackstack/rackstack.381.6/nova/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py", line 657, in _spawn
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] name_label)
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] File "/opt/rackstack/rackstack.381.6/nova/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py", line 212, in inner
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] rv = f(*args, **kwargs)
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] File "/opt/rackstack/rackstack.381.6/nova/lib/python2.7/site-packages/nova/virt/xenapi/vmops.py", line 492, in create_disks_step
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] image_meta.id, disk_image_type,
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] File "/opt/rackstack/rackstack.381.6/nova/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 66, in getter
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] self.obj_load_attr(name)
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] File "/opt/rackstack/rackstack.381.6/nova/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 555, in obj_load_attr
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] _("Cannot load '%s' in the base class") % attrname)
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0] NotImplementedError: Cannot load 'id' in the base class
2015-09-16 13:02:00.696 24755 ERROR nova.utils [instance: 897942e0]

Tags: xen
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/224286

Changed in nova:
assignee: nobody → Andrew Laski (alaski)
status: New → In Progress
Andrew Laski (alaski)
tags: added: liberty-rc-potential xen
Changed in nova:
importance: Undecided → High
Changed in nova:
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/224286
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e9ecfdce11850037c823374cee6167391e8c7fb7
Submitter: Jenkins
Branch: master

commit e9ecfdce11850037c823374cee6167391e8c7fb7
Author: Andrew Laski <email address hidden>
Date: Wed Sep 16 16:11:54 2015 -0400

    Xenapi: Don't access image_meta.id when booting from a volume

    When a request is made to boot from a preexisting volume, rather than
    asking Nova to create a volume from an image, there is no image id field
    in the image_meta that's passed in to the virt driver. This would be
    fine except that there was an attempt to access image_meta.id in the
    boot from volume case where it is not necessary. This change moves that
    access to a point where it is known that this is not an attempt to boot
    from a volume and that field should be set.

    Change-Id: I9dab14762f5d331ef2e36f617f7f66c3d771f32d
    Closes-bug: 1496557

Changed in nova:
status: In Progress → Fix Committed
Matt Riedemann (mriedem)
tags: removed: liberty-rc-potential
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-rc1 → 12.0.0
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.