Public bug reported:

***This is purely based on code inspection right now.***

With a forced host live migration, we bypass the scheduler and copy the
instance's resource allocations from the source node to the dest node:

https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/conductor/tasks/live_migrate.py#L109

https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/scheduler/utils.py#L473

On successful post live migration, we remove the doubled up allocations
(after logging a warning that we couldn't find allocations on the
migration record):

https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/compute/manager.py#L6638L6669

However, for a failed live migration, we don't do anything like that in
_rollback_live_migration. We'll call this _revert_allocation method:

https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/compute/manager.py#L6803

But it won't find allocations on the migration record and just return
False:

https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/compute/manager.py#L4130

Which means the instance will have doubled up allocations on both the
source and dest nodes.

** Affects: nova
     Importance: High
         Status: Triaged

** Affects: nova/queens
     Importance: High
         Status: Triaged


** Tags: live-migration placement

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

Title:
  Failed forced live migration does not rollback doubled up allocations
  in placement

Status in OpenStack Compute (nova):
  Triaged
Status in OpenStack Compute (nova) queens series:
  Triaged

Bug description:
  ***This is purely based on code inspection right now.***

  With a forced host live migration, we bypass the scheduler and copy
  the instance's resource allocations from the source node to the dest
  node:

  
https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/conductor/tasks/live_migrate.py#L109

  
https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/scheduler/utils.py#L473

  On successful post live migration, we remove the doubled up
  allocations (after logging a warning that we couldn't find allocations
  on the migration record):

  
https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/compute/manager.py#L6638L6669

  However, for a failed live migration, we don't do anything like that
  in _rollback_live_migration. We'll call this _revert_allocation
  method:

  
https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/compute/manager.py#L6803

  But it won't find allocations on the migration record and just return
  False:

  
https://github.com/openstack/nova/blob/6be7f7248fb1c2bbb890a0a48a424e205e173c9c/nova/compute/manager.py#L4130

  Which means the instance will have doubled up allocations on both the
  source and dest nodes.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to