11.5. Troubleshooting "No Valid Host Found" Errors

Sometimes the /var/log/nova/nova-conductor.log contains the following error:
NoValidHost: No valid host was found. There are not enough hosts available.
This means the nova Scheduler could not find a bare metal node suitable for booting the new instance. This in turn usually means a mismatch between resources that nova expects to find and resources that ironic advertised to nova. Check the following in this case:
  1. Make sure introspection succeeds for you. Otherwise check that each node contains the required ironic node properties. For each node:
    $ ironic node-show [NODE UUID]
    
    Check the properties JSON field has valid values for keys cpus, cpu_arch, memory_mb and local_gb.
  2. Check that the nova flavor used does not exceed the ironic node properties above for a required number of nodes:
    $ nova flavor-show [FLAVOR NAME]
    
  3. Check that sufficient nodes are in the available state according to ironic node-list. Nodes in manageable state usually mean a failed introspection.
  4. Check the nodes are not in maintenance mode. Use ironic node-list to check. A node automatically changing to maintenance mode usually means incorrect power credentials. Check them and then remove maintenance mode:
    $ ironic node-set-maintenance [NODE UUID] off
    
  5. If you're using the Automated Health Check (AHC) tools to perform automatic node tagging, check that you have enough nodes corresponding to each flavor/profile. Check the capabilities key in properties field for ironic node-show. For example, a node tagged for the Compute role should contain profile:compute.
  6. It takes some time for node information to propagate from ironic to nova after introspection. The director's tool usually accounts for it. However, if you performed some steps manually, there might be a short period of time when nodes are not available to nova. Use the following command to check the total resources in your system.:
    $ nova hypervisor-stats