Live migration with --force option failed with in an upgraded environment
search cancel

Live migration with --force option failed with in an upgraded environment

book

Article ID: 321742

calendar_today

Updated On: 11-14-2024

Products

VMware Integrated OpenStack

Issue/Introduction


You are trying to live migrate VM using the command but it goes into an error state:

# nova --os-compute-api-version 2.67 live-migration --force <instance UUID> compute0#

Message
Failed to retrieve allocations for consumer <instance id>: Expected to find allocations for source node resource provider <resource provider UUID>. Retry the operation without forcing a destination host.
Code
500

# openstack --debug resource provider allocation show <resource provider UUID>

RESP: [200] Connection: Keep-Alive Content-Length: 19 Content-Type: application/json Date: Mon, 25 Jul 2022 07:10:53 GMT Keep-Alive: timeout=5, max=100 Server: Apache openstack-api-version: placement 1.0 vary: openstack-api-version x-openstack-request-id: req-########-####-####-####-############

RESP BODY: {"allocations": {}}

GET call to placement for https://192.168.46.35:8778/allocations/<insance UUID> used request id req-########-####-####-####-############



Environment

7.x

Cause

This is because the allocation information is missing after upgrading from VIO 5/6 to VIO 7.x

Resolution

You can run these commands with --dry-run to not commit any changes.

  • To resolve a single live-migration failure case, you can fix the allocation by running nova-manage placement heal_allocations  inside nova-osapi pod:
[root@nova-api-osapi-#### /]# nova-manage placement heal_allocations --instance <instance UUID>
  • To fix all the allocations in the upgraded environment, he can run heal_allocations in nova-osapi pod: 
[root@nova-api-osapi-#### /]# nova-manage placement heal_allocations



Note:  If there are too many instances to fix, user can specify --max-count option to limit the max count to fix each attempt.