[libvirt] migration fails when base image has been deleted and not using shared storage

Bug #1206887 reported by Xavier Queralt
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Unassigned

Bug Description

While testing the fix for #1039662, I run into a problem with migrate/resize an instance if its base image has been deleted.

1. With more than one compute node and no shared storage, boot an image backed instance.
2. Once booted, delete the image from glance.
3. Migrate the instance to another compute node.

With the current nova this will fail when trying to initialize the instance on the destination host because it tries to cache the base image even thought the instance doesn't need it any more.

When creating a new image backed instance, libvirt will create a qcow incremental image from the specified base image (which is cached in the instances/_base directory). In this case, to run the instance we need the base image to be present.

On the other hand, when migrating an instance its qcow image will be merged with the base image before sending it to the destination host. In this case the instance doesn't need the base image for anything but the driver will still try to fetch it and fail when it doesn't exist (See https://github.com/openstack/nova/blob/master/nova/virt/libvirt/imagebackend.py#L156).

Tags: libvirt
Changed in nova:
assignee: nobody → Xavier Queralt (xqueralt)
status: New → In Progress
Revision history for this message
Xavier Queralt (xqueralt-deactivatedaccount) wrote :

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

tags: added: libvirt
Revision history for this message
Michael Still (mikal) wrote :

That code review is abandoned in gerrit.

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.