delete old nova placement resource providers
hi all,
I have a cloud that we have upgraded a few times from ocata -> pike. It is based on kolla-ansible and the current nova version is 16.1.2. In this process we have delete compute nodes as well with openstack compute service delete. The problem im facing now is when i try to "redeploy" a compute node with the same hostname. The node installs fine and shows up in compute service list and in the host_mappings db table for the correct cell_v2. However on the compute node i get this in the logs.
> 2018-05-06 01:20:43.828 7 WARNING nova.scheduler.client.report [req-c5c9cc4f-1bff-4be4-b5c3-4e5baf4d5a05 - - - - -] [req-da10b477-f77d-4ac6-9a5f-05f1899b2589] Tried to get a provider's aggregates; however the provider 00739caa-1e5c-42b0-83c4-f41a16dd5282 does not exist.
2018-05-06 01:20:43.850 7 ERROR nova.compute.manager [req-c5c9cc4f-1bff-4be4-b5c3-4e5baf4d5a05 - - - - -] Error updating resources for node compute09.cloud.lan.: TypeError: 'NoneType' object has no attribute '__getitem__'
checking the nova-status gives this
nova-status upgrade check
+-----------------------------------------------------------------------+
| Upgrade Check Results |
+-----------------------------------------------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+-----------------------------------------------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+-----------------------------------------------------------------------+
| Check: Resource Providers |
| Result: Warning |
| Details: There are 16 compute resource providers and 44 compute nodes |
| in the deployment. Ideally the number of compute resource |
| providers should equal the number of enabled compute nodes |
| otherwise the cloud may be underutilized. See |
| http://docs.openstack.org/developer/nova/placement.html |
| for more details. |
+-----------------------------------------------------------------------+
It seems to be that old provider records for compute nodes are still lingering around. How do i clean the db from these?