Failed to create resource provider

Bug #1876769 reported by YG Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Invalid
Undecided
Unassigned

Bug Description

HI,

We have an openstack ansible rocky 18.1.2 setup. It was working working fine. As part of an upgrade
we have reinstalled it. Now we are unable to create any vms. We have four compute nodes.
When we try to create a vm on a specific compute node, it is failing, showing no host found in the nova-conductor and scheduler logs. When I observed the nova-compute log on the compute, we have found the following errors:

-------------
2020-05-04 12:59:55.800 11245 ERROR nova.scheduler.client.report [req-40cd6d9d-3fb5-4a85-b348-53705f22148e - - - - -] [req-68c57117-a4b0-46b2-a75b-36e8d665da38] Failed to create resource provider record in placement API for UUID 7e6fb27c-ed5b-4c2c-8373-c99e98da7bcc. Got 409: {"errors": [{"status": 409, "request_id": "req-68c57117-a4b0-46b2-a75b-36e8d665da38", "detail": "There was a conflict when trying to complete your request.\n\n Conflicting resource provider name: b2b.blr.example.cloud already exists. ", "title": "Conflict"}]}.

2020-05-04 12:59:55.801 11245 ERROR nova.compute.manager raise exception.ResourceProviderCreationFailed(name=name)
2020-05-04 12:59:55.801 11245 ERROR nova.compute.manager ResourceProviderCreationFailed: Failed to create resource provider b2b.blr.example.cloud
2020-05-04 12:59:55.801 11245 ERROR nova.compute.manager
----------------

Can you help us solve this error ?

Thanks
Kumar

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote (last edit ):

Hi,

I believe in this case you need to go to the placement database and ensure that a resource provider with same name but different UUID is not present there.

And you have 2 options more or less:

1. either delete record from placement. But this might leave quite some resources without assignment and broken allocations:

# openstack resource provider list
+--------------------------------------+----------------------------------+------------+--------------------------------------+----------------------+
| uuid | name | generation | root_provider_uuid | parent_provider_uuid |
+--------------------------------------+----------------------------------+------------+--------------------------------------+----------------------+
| d5623168-23aa-427c-b1c8-4af1b79cf33b | b2b.blr.example.cloud | 2685 | d5623168-23aa-427c-b1c8-4af1b79cf33b | None |
+--------------------------------------+----------------------------------+------------+--------------------------------------+----------------------+
# openstack resource provider delete d5623168-23aa-427c-b1c8-4af1b79cf33b

After that nova-compute should be able to re-create resource provider and spawn normally.

2. Update MySQL database for placement, by updating UUID with the one you found in the log. for example:

mysql> update placement.resource_providers set uuid = '7e6fb27c-ed5b-4c2c-8373-c99e98da7bcc' where name = 'b2b.blr.example.cloud';

Though I will mark this report as invalid, since it is a generic OpenStack support request, rather then a bug in OpenStack-Ansible.

Changed in openstack-ansible:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.