instance's directory is not removed at destination host during rollback of pre_live_migration

Bug #1392947 reported by ChangBo Guo(gcb)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
ChangBo Guo(gcb)

Bug Description

In method pre_live_migration, we create instance's directory at destination host during block live migration.
If some exceptions happen before creating domain succesfully like failure of connecting volume to destination host,
then we can't destroy instance in method rollback_live_migration_at_destination.
In this case we don't remove the instance's directory, this will lead anDestinationDiskExists when live migratin same instance to same destination.

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

Changed in nova:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit be22375255e471bd187f98972210e79e9b7eafcd
Author: ChangBo Guo(gcb) <email address hidden>
Date: Fri Nov 14 13:42:41 2014 +0800

    libvirt: clean instance's directory when block migration fails

    In method pre_live_migration, we create instance's directory at destination
    host during block live migration. If some exceptions happen before creating
    domain succesfully like failure of connecting volume to destination host,
    then we can't destroy instance in method rollback_live_migration_at_destination.
    In this case we don't remove the instance's directory, this will lead an
    DestinationDiskExists when live migration same instance to same destination.
    This commit ensure the instance's directory is always cleaned at destination
    host. This commit also extracts instance path calculation into a utility function.

    Closes-Bug: #1392947
    Change-Id: If86e73b07f17d28078ee48983e9e92aafb30d913

Changed in nova:
status: In Progress → Fix Committed
tags: added: juno-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-2 → 2015.1.0
Revision history for this message
Michal Jura (mjura) wrote :

I've backported this fix to Juno

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.