Skip to content
Snippets Groups Projects
Commit 668793cf authored by Matteo's avatar Matteo
Browse files

20220131 Matteo: add new kb

parent 43cc2b7e
No related branches found
No related tags found
No related merge requests found
Nova compute - how to recover from the 'failed to creare resource provider' error
=================================================================================
In some circumstances, a nova compute can encounter the following error: '**failed to creare resource provider**'. When this error occurs, the nova compute is unable to migrate/create/reboot VMs.
Here is the procedure to recover from this error:
1. Identify the resource provider that matches the nova compute in error::
$ openstack resource provider list --name <compute-node-host>
2. List all the allocations for this resource provider::
$ openstack resource provider show --allocations <resource-provider-id>
3. For all the allocations UUIDs from the previous step, execute the following commands::
Get and **SAVE** the allocations for the server
$ openstack --os-placement-api-version 1.12 resource provider allocation show <allocation-id>
$ openstack server show <allocation-id> // check in which compute node the VM is running
If the 'resource provider allocation show' command shows that there is ONLY ONE resource provider in the allocation, delete the allocation
$ openstack resource provider delete <allocation-id>
If there were multiple resource provider in the allocation, delete only the allocation for the compute node in error by omitting the resouce provider that matches the nova computer in error
$ openstack --os-placement-api-version 1.12 resource provider allocation set <allocation-id> --project-id <project-id> --user-id <user-id> --allocation rp=<other-resource-provider>,MEMORY_MB=<ram-quota>,VCPU=<cpu-quota>,DISK_GB=<disk-quota>
4. Once you have deleted and **SAVED** all the allocations, delete the resource provider::
$ openstack resource provider delete <allocation-id>
5. Restart nova-compute. The resource providers should be re-created successfully::
6. Get the (new) resource provider UUID using the compute host name::
$ openstack resource provider list --name <compute-node-host>
7. If necessary (meaning, 'openstack server show' from step 3 shows that the VM is running on the nova compute previously in error), restore all of the previously saved allocations for the servers on the compute node::
$ openstack --os-placement-api-version 1.12 resource provider allocation set <allocation-id> --project-id <project-id> --user-id <user-id> --allocation rp=<new-resource-provider>,MEMORY_MB=<ram-quota>,VCPU=<cpu-quota>,DISK_GB=<disk-quota>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment