Openstak compute resource providers warning

9 Oct

Visits: 1420

After facing nova placement problem and spend a night, I have another warning when I ran “nova-status upgrade check”. From the warning message I found that there are 1 compute resource providers and 2 compute nodes in the deployment that doesn’t equal. Afer look into sql database I found that there  one host that’s not valid in this deployment. 

Here is the full warning when I ran nova-status upgrade check:

Check: Resource Providers
Result: Warning
Details: There are 1 compute resource providers and 2 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.

In details, I have 2 compute node listed in mysql database but only 1 node that active and valid so I need to remove inactive host from that database. Here is what I’m doing:
1. Find the compute node or hypervisor host
Login to mysql database:
> mysql -u root -pyourpassword
> use nova;
> select * from compute_nodes;

2. Then choose the hypervisor hostname you want to remove. In this case, I want to remove compute node with hostname compute01:
> DELETE FROM compute_nodes where hypervisor_hostname=’compute01′;

We also need to remove the host mapping from nova_api databases, here we go:
> use nova_api;
> select * from host_mappings;
> DELETE FROM host_mappings WHERE host=’compute01′;

And try to run nova-status upgrade check:

# 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: Success           |
| Details: None             |
+---------------------------+

Hope this help and solved “There are 1 compute resource providers and 2 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” problem

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.