resume guests on libvirt host reboot fails for instances created from multi-part image

Bug #1195884 reported by Phil Day
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Chris St. Pierre

Bug Description

If an instance is created from a multi-part image (i.e. separate kernal and ramdisk files) , and resume_guests_state_on_host_boot=True the resulting _hard_reboot will fail and put the instance into an error state.

This is because the code in _hard_reboot that checks the image files, _create_images_and_backing() always tries to reload these from Glance.

In a normal reboot this results in an unnecessary image download from Glance.

In the case of reboot following a host boot the download fails because the context at this point does not have credentials to be able to access Glance.

Possible fix is to:
- Check files exist rather than always trying to download them
- Provide in conf credentails of a user that has read access to all images in Glance than can be used in this context

Tags: libvirt
Matt Riedemann (mriedem)
tags: added: libvirt
Changed in nova:
assignee: nobody → Rafi Khardalian (rkhardalian)
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/35018

Changed in nova:
status: New → In Progress
Revision history for this message
Sean Dague (sdague) wrote :

This bug is sufficiently old it would be good to confirm that it remains an issue

Changed in nova:
status: In Progress → Incomplete
importance: Undecided → Low
assignee: Rafi Khardalian (rkhardalian) → nobody
Revision history for this message
Chris St. Pierre (stpierre) wrote :

I have confirmed that this is still an issue in the latest master.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: nobody → Chris St. Pierre (stpierre)
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 5e650e3681d40069dacf1ea2e43b07b362cf1bc3
Author: Chris St. Pierre <email address hidden>
Date: Tue Dec 2 13:58:46 2014 -0600

    libvirt: Handle empty context on _hard_reboot

    When _hard_reboot runs for resume_guest_state_on_host_boot, we don't
    have a valid context. This checks if the context is valid before
    attempting to repopulate base images.

    This is a bit of a hack, as it assumes that the base images already
    exist on the system, and will fail if they don't. However, it reduces
    the number of failures (without this, every downed guest is guaranteed
    to error when coming back up for resume_guest_state_on_host_boot).

    Closes-Bug: 1195884
    Change-Id: Ibac52f5d1b4e5ab2adb0a561659e6df8c7c1f40f

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Revision history for this message
Eric Xie (mark-xiett) wrote :

hi Chris, why did not fix the bug with the method below:
- Provide in conf credentails of a user that has read access to all images in Glance than can be used in this context
Thanks.

Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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