← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1836369] [NEW] _init_instance recovery from failed in-progress resize leaves old records and allocations

 

Public bug reported:

This came up in review here:

https://review.opendev.org/#/c/667177/8/nova/virt/libvirt/driver.py@9175

And was confirmed in a functional test patch here:

https://review.opendev.org/#/c/670393/

There are some known things that get left behind when recovering a guest
on the source host when the source compute service host crashes while
the virt driver's migrate_disk_and_power_off are running:

- the instance.migration_context
- the instance.new_flavor
- the instance.system_metadata 'old_vm_state' key

The migration_context might be the only real issue there since it's used
in the API for routing os-server-external-events. Those fields all get
set during _prep_resize on the dest host.

Probably the bigger issue is the migration-based allocations don't get
cleaned up. This means the source host allocations are still tracked
against the migration record for the old flavor, and the dest host
allocations for the new flavor are tracked by the instance, even though
the instance isn't running on the dest host.

** Affects: nova
     Importance: Low
         Status: Triaged


** Tags: compute resize

** Changed in: nova
   Importance: Undecided => Low

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

Title:
  _init_instance recovery from failed in-progress resize leaves old
  records and allocations

Status in OpenStack Compute (nova):
  Triaged

Bug description:
  This came up in review here:

  https://review.opendev.org/#/c/667177/8/nova/virt/libvirt/driver.py@9175

  And was confirmed in a functional test patch here:

  https://review.opendev.org/#/c/670393/

  There are some known things that get left behind when recovering a
  guest on the source host when the source compute service host crashes
  while the virt driver's migrate_disk_and_power_off are running:

  - the instance.migration_context
  - the instance.new_flavor
  - the instance.system_metadata 'old_vm_state' key

  The migration_context might be the only real issue there since it's
  used in the API for routing os-server-external-events. Those fields
  all get set during _prep_resize on the dest host.

  Probably the bigger issue is the migration-based allocations don't get
  cleaned up. This means the source host allocations are still tracked
  against the migration record for the old flavor, and the dest host
  allocations for the new flavor are tracked by the instance, even
  though the instance isn't running on the dest host.

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