← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1778206] Re: Compute leaks volume attachments if we fail in driver.pre_live_migration

 

Reviewed:  https://review.openstack.org/587439
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1a29248d5e688ba1d4f806895dccd45fcb34b833
Submitter: Zuul
Branch:    master

commit 1a29248d5e688ba1d4f806895dccd45fcb34b833
Author: Matthew Booth <mbooth@xxxxxxxxxx>
Date:   Tue Jun 26 14:42:47 2018 +0100

    Ensure attachment cleanup on failure in driver.pre_live_migration
    
    Previously, if the call to driver.pre_live_migration failed (which in
    libvirt can happen with a DestinationDiskExists exception), the
    compute manager wouldn't rollback/cleanup volume attachments, leading
    to corrupt volume attachment information, and, depending on the
    backend, the instance being unable to access its volume. This patch
    moves the driver.pre_live_migration call inside the existing
    try/except, allowing the compute manager to properly rollback/cleanup
    volume attachments.
    
    The compute manager has its own _rollback_live_migration() cleanup in
    case the pre_live_migration() RPC call to the destination fails. There
    should be no conflicts between the cleanup in that and the new volume
    cleanup in the except block. The remove_volume_connection() ->
    driver_detach() -> detach_volume() call catches the InstanceNotFound
    exception and warns about the instance disappearing (it was never
    really on the destination in the first place). The attachment_delete()
    in _rollback_live_migration() is contingent on there being an
    old_vol_attachment in migrate_data, which there isn't because
    pre_live_migration() raised instead of returning.
    
    Change-Id: I67f66e95d69ae6df22e539550a3eac697ea8f5d8
    Closes-bug: 1778206


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1778206

Title:
  Compute leaks volume attachments if we fail in
  driver.pre_live_migration

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  ComputeManager.pre_live_migration fails to clean up volume attachments
  if the call to driver.pre_live_migration() fails. There's a try block
  in there to clean up attachments, but its scope isn't large enough.
  The result is a volume in a perpetual attaching state.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1778206/+subscriptions


References