Nova migration does not check if image is still available

Bug #1177001 reported by Trevor Adams
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Nikola Đipanov
Grizzly
Fix Released
Critical
Nikola Đipanov

Bug Description

Nova migration will fail if the image is not available, nova currently tries migration and therefore trashes the instance. Unlike some other failure cases, nova can check that the image is still available prior to starting migration. It should probably also warn about the removal of images that have instances that depend on them.

Reversion of the migrate is discussed here: https://bugs.launchpad.net/nova/+bug/1061024 but this is an action that can be done beforehand.

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

Bug causes data loss, that makes it a critical in my book.

Changed in nova:
status: New → Triaged
importance: Undecided → Critical
Changed in nova:
assignee: nobody → William Kelly (the-william-kelly)
Revision history for this message
Rafi Khardalian (rkhardalian) wrote :

I recommend setting remove_unused_base_images=False until this is resolved, so that cached copies are kept around even after a migration (albeit broken) occurs.

Revision history for this message
Belmiro Moreira (moreira-belmiro-email-lists) wrote :

Hi,
as far I can see, nova migration/resize fails if the image is not available in glance with an early test in nova.compute.api
See bug #1160773.
Can you add more details to the description of this bug?

Revision history for this message
Trevor Adams (tra26) wrote :

I create an instance, that spawns on host 4 using the basic cirros image. I then use non-live migration to move it to another host(host 5). The disk arrives at the new host and horizon reports it living on the new host. The new host reports the attached stack trace, sets the instance to error which gives you the only option to kill the instance.

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/29793

Changed in nova:
assignee: William Kelly (the-william-kelly) → Nikola Đipanov (ndipanov)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/29793
Committed: http://github.com/openstack/nova/commit/65a6264c236a779712694d2379cfe4f9e46e2732
Submitter: Jenkins
Branch: master

commit 65a6264c236a779712694d2379cfe4f9e46e2732
Author: Nikola Dipanov <email address hidden>
Date: Mon May 20 17:36:49 2013 +0200

    Disallow resize if image not available

    If a resize is attempted on an instance that was started from an image
    that has since been deleted, a resize will fail. This change makes error
    reporting a bit cleaner.

    This change is needed since in order to actually properly support
    resize/migrate when the image is deleted - it is necessary for nova to keep
    a copy of the image metadata and re-use it in case of migration/resize.

    Fixes bug: 1160773
    Fixes bug: 1177001

    Change-Id: Ifaea71f79c97046a4cde094e3a5e676772fcceb4

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/30442

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/30442
Committed: http://github.com/openstack/nova/commit/ab51ac688e3019c068e99814ae766d994ff41d00
Submitter: Jenkins
Branch: stable/grizzly

commit ab51ac688e3019c068e99814ae766d994ff41d00
Author: Nikola Dipanov <email address hidden>
Date: Mon May 20 17:36:49 2013 +0200

    Disallow resize if image not available

    If a resize is attempted on an instance that was started from an image
    that has since been deleted, a resize will fail. This change makes error
    reporting a bit cleaner.

    This change is needed since in order to actually properly support
    resize/migrate when the image is deleted - it is necessary for nova to keep
    a copy of the image metadata and re-use it in case of migration/resize.

    Fixes bug: 1160773
    Fixes bug: 1177001

    Change-Id: Ifaea71f79c97046a4cde094e3a5e676772fcceb4
    (cherry picked from commit 65a6264c236a779712694d2379cfe4f9e46e2732)

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.