Ask Your Question
2

Create Instance but got "no valid host"

asked 2017-07-11 01:20:52 -0600

xyue gravatar image

updated 2017-07-11 07:19:20 -0600

Bernd Bausch gravatar image

Hi Guys,

I just installed the 2 nodes (controller and compute) by following the guide lines:
https://docs.openstack.org/ocata/inst...

After the installaton is done, I tried to create an instance but it shows me error as below :

Message : "No valid host was found. There are not enough hosts available."

Code : 500

Details

File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 866, in schedule_and_build_instances request_specs[0].to_legacy_filter_properties_dict()) File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 597, in _schedule_instances hosts = self.scheduler_client.select_destinations(context, spec_obj) File "/usr/lib/python2.7/site-packages/nova/scheduler/utils.py", line 371, in wrapped return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 51, in select_destinations return selfFile "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 866, in schedule_and_build_instances request_specs[0].to_legacy_filter_properties_dict()) File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 597, in _schedule_instances hosts = self.scheduler_client.select_destinations(context, spec_obj) File "/usr/lib/python2.7/site-packages/nova/scheduler/utils.py", line 371, in wrapped return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 51, in select_destinations return self.queryclient.select_destinations(context, spec_obj) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 37, in __run_method return getattr(self.instance, __name)(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/query.py", line 32, in select_destinations return self.scheduler_rpcapi.select_destinations(context, spec_obj) File "/usr/lib/python2.7/site-packages/nova/scheduler/rpcapi.py", line 129, in select_destinations return cctxt.call(ctxt, 'select_destinations', **msg_args) File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 169, in call retry=self.retry) File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 97, in _send timeout=timeout, retry=retry) File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 458, in send retry=retry) File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 449, in _send raise result

When i check the nova-compute.log in my compute node, it seems the placement api is not responding.

2017-07-11 21:39:25.348 3541 WARNING nova.scheduler.client.report [req-fb1a5210-a4b1-4738-894d-f0f847bd7a08 - - - - -] Placement API service is not responding.
2017-07-11 21:39:25.350 3541 WARNING nova.scheduler.client.report [req-fb1a5210-a4b1-4738-894d-f0f847bd7a08 - - - - -] Placement API service is not responding.
2017-07-11 21:39:25.351 3541 WARNING nova.scheduler.client.report [req-fb1a5210-a4b1-4738-894d-f0f847bd7a08 - - - - -] Unable to refresh my resource provider record
2017-07-11 21:39:25.370 3541 WARNING nova.scheduler.client.report [req-fb1a5210-a4b1-4738-894d-f0f847bd7a08 - - - - -] Placement API service is not responding.
2017-07-11 21:39:25.407 3541 INFO nova.compute.resource_tracker [req-fb1a5210-a4b1-4738-894d-f0f847bd7a08 - - - - -] Final resource view: name=compute1 phys_ram=8191MB used_ram=512MB phys_disk=49GB used_disk=0GB total_vcpus=2 used_vcpus=0 pci_stats=[]

Can anyone advise how to handle this error message ? Tried few ways which found in internet but unable to solve the error.

Thank you very much in advance.

edit retag flag offensive close merge delete

Comments

Hi, Try restarting rabbitmq service. Later ensure all the installed services in your setup is active. Which image you used to launch instance?

Praveen N gravatar imagePraveen N ( 2017-07-11 04:21:52 -0600 )edit

What's the output of nova service-list? Have you also configured [placement] section in /etc/nova/nova.conf?

eblock gravatar imageeblock ( 2017-07-11 04:51:07 -0600 )edit

Placement service not responding could also mean that the placement API's port is blocked on the controller.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-11 07:20:52 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2017-07-12 01:03:59 -0600

xyue gravatar image

Hi Praveen,

I have tried to restart the service. However, still having the same error. I use Cirros which is recommended in the openstack installation link.

[root@controller ~]# openstack flavor list
+--------------------------------------+---------+------+------+-----------+-------+-----------+
| ID                                   | Name    |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+---------+------+------+-----------+-------+-----------+
| 7fe4a706-039a-44a2-8366-b64cf3339ec2 | m1.nano |  64  |   2  |         0 |     1 | True      |
+--------------------------------------+---------+------+------+-----------+-------+-----------+
[root@controller ~]# openstack image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| 5d59dc57-3580-47f6-bb77-171d76b59fff | cirros | active |
+--------------------------------------+--------+--------+

Hi eblock,

I have checked the [placement] in the nova.conf and configuration is as below.

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = Password123

Below is the service-list from nova

+----+------------------+------------+----------+---------+-------+-------------    
| Id | Binary           | Host       | Zone     | Status  | State | Updated_at    
+----+------------------+------------+----------+---------+-------+-------------    
| 1  | nova-scheduler   | controller | internal | enabled | up    | 2017-07-12T1    
| 2  | nova-conductor   | controller | internal | enabled | up    | 2017-07-12T1    
| 3  | nova-consoleauth | controller | internal | enabled | up    | 2017-07-12T1    
| 8  | nova-compute     | compute1   | nova     | enabled | up    | 2017-07-12T1    
+----+------------------+------------+----------+---------+-------+-------------

Hi Bernd,

I have checked the port 9292, it has enabled on the firewalld side.

[root@controller ~]#   firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens160 ens192
  sources:
  services: dhcpv6-client ssh
  ports: 9292/tcp 3389/tcp 5672/tcp 80/tcp 35357/tcp
  protocols:
  masquerade: no
  forward-ports:
  sourceports:
  icmp-blocks:
  rich rules:
[root@controller ~]#

I tried to check through all the installation verification steps and found below warning message:

root@controller ~]# 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 no compute resource providers in the Placement |
|   service but there are 1 compute nodes in the deployment.        |
|   This means no compute nodes are reporting into the              |
|   Placement service and need to be upgraded and/or fixed.         |
|   See                                                             |
|   http://docs.openstack.org/developer/nova/placement.html         |
|   for more details.                                               |
+-------------------------------------------------------------------+

Seems the resource providers having warning message. Is this normal ?

Please advise and thank you very much in advance.

edit flag offensive delete link more

Comments

@xyue, Please check the cirros image properties. Ensure you upload cirros image to glance with architecture as x86_64. And then retry to launch instance

Praveen N gravatar imagePraveen N ( 2017-07-12 01:10:14 -0600 )edit

The resource providers error comes from the compute node not being able to reach the placement service.

Check the placement service config on the compute node and check if you can reach the placement service using this config.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-12 02:42:12 -0600 )edit

@Praveen N, I remove old cirros and redownload the new cirros. However, got below error when upload

410 Gone 
Error in store configuration. Adding images to store is disabled.
    (HTTP N/A)

Checked the rabbitmq and it was running fine. Can advise and steps to check on this ?

xyue gravatar imagexyue ( 2017-07-12 02:46:15 -0600 )edit

@xyue, Ensure glance service are up/active. Please check in glance api and registry logs for the error during image upload.

Praveen N gravatar imagePraveen N ( 2017-07-12 05:42:42 -0600 )edit

@Praveen N, I have checked the openstack-glance-api & openstack-glance-registry services and both are up and running.

Checked api.log and found below :

StoreAddDisabled: Configuration for store failed. Adding images to this store is disabled.
xyue gravatar imagexyue ( 2017-07-13 02:44:25 -0600 )edit
0

answered 2017-07-12 04:45:28 -0600

fateem gravatar image

i had this problem yesterday and after many efforts i got that the resources are not enough ! the problem solved in this simple way

edit flag offensive delete link more

Comments

Hi , @fateem, Can i know what is your resources before and after ? Thank you.

xyue gravatar imagexyue ( 2017-07-13 02:41:09 -0600 )edit

i was install openstack on a limited resource vm.so i couldn't create an instance with many resources. i deleted my instaces and delete their volume on volume tab.then create a new instance (flavor: m1.smal ) and it works

fateem gravatar imagefateem ( 2017-07-15 04:01:05 -0600 )edit

my vm spec as below:

controller:2 cpu, 8GB RAM, 100G disk spacce

compute:2 cpu, 8GB RAM, 100G disk space

the instance i create only take 64MB RAM and 1G disk space (as m1.nano) which i think it should be fine.

xyue gravatar imagexyue ( 2017-07-16 20:35:21 -0600 )edit
-1

answered 2017-08-05 02:38:36 -0600

liys gravatar image

mayba you drop databases all nova nova_api nova_cell0 glance and neutron create and update

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-07-11 01:20:52 -0600

Seen: 465 times

Last updated: Jul 12