Hyper-V: failed cold migrations cannot be reverted

Bug #1555699 reported by Lucian Petrut
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Claudiu Belu
compute-hyperv
Fix Released
High
Claudiu Belu

Bug Description

When performing a cold migration, the Hyper-V driver moves the instance files to a temporary folder, and from there, it copies them to the destination node.

The instance folder is not moved entirely, as it will hold some Hyper-V specific files that cannot be deleted/moved while the instance exists, basically we just take the files that we care about, while leaving the folder there.

If the migration fails, the driver tries to move the temporary directory to the actual instance path, but fails as there already is a folder.

Trace: http://paste.openstack.org/show/490025/

tags: added: hyper-v
Claudiu Belu (cbelu)
tags: added: liberty-backport-potential
tags: added: mitaka-rc-potential
removed: liberty-backport-potential
Changed in nova:
importance: Undecided → Critical
Changed in nova:
importance: Critical → High
tags: added: liberty-backport-potential
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/291733

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

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

commit 9740e18a31c0682d2852ac745242c69475d89113
Author: Claudiu Belu <email address hidden>
Date: Fri Mar 11 16:09:52 2016 +0200

    hyper-v: Copies back files on failed migration

    On cold migration, the contents of the instance folder are
    copied to the new host. The original folder cannot be removed
    because the VM configuration files cannot be deleted until the VM
    is destroyed.

    Because of this, when the migration fails to copy the files, it will
    try to revert this through folder renaming. Since the original folder
    still exists, an exception is raised.

    Change-Id: Ia42ed873924999d57336a105bcaa2b856f3a3a9d
    Closes-Bug: #1555699

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/nova 13.0.0.0rc1

This issue was fixed in the openstack/nova 13.0.0.0rc1 release candidate.

Matt Riedemann (mriedem)
tags: removed: mitaka-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to compute-hyperv (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/320570

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to compute-hyperv (stable/liberty)

Reviewed: https://review.openstack.org/320570
Committed: https://git.openstack.org/cgit/openstack/compute-hyperv/commit/?id=7527a1f4d60a804f54cba7a7da706bf66863d789
Submitter: Jenkins
Branch: stable/liberty

commit 7527a1f4d60a804f54cba7a7da706bf66863d789
Author: Claudiu Belu <email address hidden>
Date: Thu Mar 17 03:35:51 2016 -0700

    hyper-v: Copies back files on failed migration

    On cold migration, the contents of the instance folder are
    copied to the new host. The original folder cannot be removed
    because the VM configuration files cannot be deleted until the VM
    is destroyed.

    Because of this, when the migration fails to copy the files, it will
    try to revert this through folder renaming. Since the original folder
    still exists, an exception is raised.

    Change-Id: Ia42ed873924999d57336a105bcaa2b856f3a3a9d
    Closes-Bug: #1555699
    (cherry picked from commit 7fb627c317d93b041b76263740f5729dade05b39)

tags: added: in-stable-liberty
Claudiu Belu (cbelu)
Changed in compute-hyperv:
importance: Undecided → High
assignee: nobody → Claudiu Belu (cbelu)
status: New → Fix Committed
Claudiu Belu (cbelu)
Changed in compute-hyperv:
status: Fix Committed → Fix Released
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.