Ask Your Question

Regex's profile - activity

2018-04-12 14:22:55 -0500 received badge  Famous Question (source)
2018-04-12 14:22:55 -0500 received badge  Notable Question (source)
2018-03-20 10:20:11 -0500 received badge  Enthusiast
2018-03-19 15:21:21 -0500 received badge  Popular Question (source)
2018-03-14 10:27:47 -0500 asked a question Openstack pike: No valid host was found. There are not enough hosts available. - code 500

I have setup a multi nodes Openstack env using tripleO for a PoC. The environment consists of (Running on baremetal):

1- Undercloud
2- Overcloud:
        -Controller
        -Compute-0
        -Compute-1

I have created a few instances and everything is fine but now I'm not able to create any new instance. I have checked the compute resources and they are plenty. I'm using cinder for both storing the instances and images.

 (overcloud) [heat-admin@overcloud-controller-0 ~]$ openstack compute service list
+----+------------------+---------------------------------+-----------+---------+-------+----------------------------+
| ID | Binary           | Host                            | Zone      | Status  | State | Updated At                 |
+----+------------------+---------------------------------+-----------+---------+-------+----------------------------+
|  4 | nova-conductor   | overcloud-controller-0.lab.poc  | internal  | enabled | up    | 2018-03-13T08:50:50.000000 |
| 18 | nova-compute     | overcloud-novacompute-1.lab.poc | compute-1 | enabled | up    | 2018-03-13T08:50:49.000000 |
| 19 | nova-consoleauth | overcloud-controller-0.lab.poc  | internal  | enabled | up    | 2018-03-13T08:50:47.000000 |
| 20 | nova-scheduler   | overcloud-controller-0.lab.poc  | internal  | enabled | up    | 2018-03-13T08:50:51.000000 |
| 21 | nova-compute     | overcloud-novacompute-0.lab.poc | compute-0 | enabled | up    | 2018-03-13T08:50:50.000000 |
+----+------------------+---------------------------------+-----------+---------+-------+----------------------------+
nova-conductor.log (debug enabled):
 2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager [req-c982618d-c1c0-46f1-9182-3e542f5af8af 5c1e3b2d8bc44ca08d3ccfe9c2a6ff17 7e66bf9554f748018600d046f22acc16 - default default] Failed to schedule instances: NoValidHost_Remote: No valid host was found. There are not enough hosts available. There are not enough hosts available.
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 232, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 149, in select_destinations
    alloc_reqs_by_rp_uuid, provider_summaries)

  File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 110, in select_destinations
    raise exception.NoValidHost(reason=reason)

NoValidHost: No valid host was found. There are not enough hosts available.
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager Traceback (most recent call last):
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager   File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 1036, in schedule_and_build_instances
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager     instance_uuids)
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager   File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 626, in _schedule_instances
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager     request_spec, instance_uuids)
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/utils.py", line 586, in wrapped
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager     return func(*args, **kwargs)
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 52, in select_destinations
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager     instance_uuids)
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 37, in __run_method
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager     return getattr(self.instance, __name)(*args, **kwargs)
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/query.py", line 33, in select_destinations
2018-03-13 07:13:52.676 3840 ERROR nova.conductor.manager     instance_uuids)
2018-03-13 07:13:52.676 3840 ERROR ...
(more)
2018-03-14 10:27:25 -0500 answered a question Openstack pike: No valid host was found. There are not enough hosts available. - code 500

After spending so much time, i found the exact issue and it turns out that the disk size used for filtering is wrong because whenever you create an instance, it thinks that you use the local disk and it adds that size to the total disk size (in case you use external storage for cinder).

I found a workaround for now, which is to create a new flavor with the root disk space set to '0' .