Ask Your Question

CodesMcCodes's profile - activity

2017-08-26 12:06:34 -0500 received badge  Teacher (source)
2017-08-26 12:06:34 -0500 received badge  Necromancer (source)
2016-10-06 20:08:46 -0500 answered a question No valid host was found. There are not enough hosts available.

I ran up against the No valid host was found. There are not enough hosts available error and couldn't figure out why. I knew it wasn't due to image format because I had previously used this instance. The instance that launched didn't have enough ram because I accidentally gave it 4MB instead of 4GB so I decided to delete and recreate the instance to resize the ram. BTW. The reason I chose to delete and recreate is because I was running into the same error when trying to resize. Because, by default, OpenStack will try to resize the instance on a different host. So anyways when trying to recreate I ran into this error and totally hit a dead end.

I tried everything mgmead suggested.

The key for me was this in the /var/log/nova/nova-scheduler.log

2016-10-06 15:13:37.839 30218 INFO nova.filters [req-3b92a5a1-2a51-4d9c-b98d-cfa2bf6b2e5e 5d7a59d920084480b4beb0d145f13cd8 925b92a5b70a4ce9965a9d3ecc7e87c6 - - -] Filter ComputeCapabilitiesFilter returned 0 hosts 2016-10-06 15:13:37.840 30218 INFO nova.filters [req-3b92a5a1-2a51-4d9c-b98d-cfa2bf6b2e5e 5d7a59d920084480b4beb0d145f13cd8 925b92a5b70a4ce9965a9d3ecc7e87c6 - - -] Filtering removed all hosts for the request with instance ID '3d52306e-6232-4584-9513-03dcba0d9df9'. Filter results: ['RetryFilter: (start: 3, end: 3)', 'AvailabilityZoneFilter: (start: 3, end: 3)', 'RamFilter: (start: 3, end: 3)', 'DiskFilter: (start: 3, end: 3)', 'ComputeFilter: (start: 3, end: 2)', 'ComputeCapabilitiesFilter: (start: 2, end: 0)']

So basically before running the ComputeCapabilitiesFilter filter there were 2 candidate hosts, but after there were no hosts left. But why??? after googling ComputeCapabilitiesFilter I realized that it was testing for extra-specs that I accidentally added when trying to change my flavor incorrectly.

[root@control01 ~]# openstack flavor show lb
+----------------------------+--------------------------------------+
| Field                      | Value                                |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                |
| OS-FLV-EXT-DATA:ephemeral  | 0                                    |
| disk                       | 25                                   |
| id                         | 155ef9c8-e685-4236-a766-ee82f0ca8089 |
| name                       | lb                                   |
| os-flavor-access:is_public | True                                 |
| properties                 | ram='4096'                           |
| ram                        | 4096                                 |
| rxtx_factor                | 1.0                                  |
| swap                       |                                      |
| vcpus                      | 4                                    |
+----------------------------+--------------------------------------+

Here you can see in the properties that I had ram='4096'. No bueno. Deleted the metadata for this flavor in the dashboard and I was finally able to start a new instance.

Hope this helps someone.