Failed to create resource provider
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.
2020-05-04 12:59:55.801 11245 ERROR nova.compute.
2020-05-04 12:59:55.801 11245 ERROR nova.compute.
2020-05-04 12:59:55.801 11245 ERROR nova.compute.
----------------
Can you help us solve this error ?
Thanks
Kumar
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 ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ----+-- ------- ---+--- ------- ------- ------- ------- ------- +------ ------- ------- --+ provider_ uuid | ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ----+-- ------- ---+--- ------- ------- ------- ------- ------- +------ ------- ------- --+ 23aa-427c- b1c8-4af1b79cf3 3b | b2b.blr. example. cloud | 2685 | d5623168- 23aa-427c- b1c8-4af1b79cf3 3b | None | ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ----+-- ------- ---+--- ------- ------- ------- ------- ------- +------ ------- ------- --+ 23aa-427c- b1c8-4af1b79cf3 3b
+------
| uuid | name | generation | root_provider_uuid | parent_
+------
| d5623168-
+------
# openstack resource provider delete d5623168-
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-c99e98da7b cc' 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.