Ask Your Question
2

Create Instance but got "no valid host"

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

xyue gravatar image

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

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 -0500 )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 -0500 )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 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
0

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

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 -0500 )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 -0500 )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 -0500 )edit

@fateem i got this error and i created a small instance but still not enough resources. can you help me please?

najeh gravatar imagenajeh ( 2019-01-26 09:11:07 -0500 )edit
0

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

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 -0500 )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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

Checked registry.log and found below message:

WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
xyue gravatar imagexyue ( 2017-07-13 02:45:08 -0500 )edit

This doesn't look like an error, and it has nothing to do with the placement service.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-14 00:14:58 -0500 )edit

@Bernd Bausch, do you have any idea on the cause ? Tried googled few days but no result found. Now got below error when uploading the image also.

410 Gone 
Error in store configuration. Adding images to store is disabled.
    (HTTP N/A)
xyue gravatar imagexyue ( 2017-07-14 00:40:54 -0500 )edit

Cause of the WARNING? I don't know, but I wouldn't care.

Cause of your Placement Service problems? As I said above: Check the placement service config on the compute node and check if you can reach the placement service using this config.

Cause of Adding Images Disabled: What is your Glance store?

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-14 01:11:57 -0500 )edit

The Glance store problem indicates that your store can't upload anything. The only store that has read-only access, as far as I know, is HTTP. If your default store is not HTTP, it's weird. Check the Glance logs.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-14 01:17:48 -0500 )edit

My glance store config in glance-api is set as below.

[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

I have checked the directory and has change the permission mode to 666 but still the same

xyue gravatar imagexyue ( 2017-07-14 03:59:07 -0500 )edit

Checked the placment config in the compute node. Can access auth_url

[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 : xx
password : xx
xyue gravatar imagexyue ( 2017-07-14 03:59:51 -0500 )edit

Sorry I didn't research this enough. The placement service's endpoint should be defined as in https://docs.openstack.org/ocata/inst.... Try to reach the placement endpoint from the compute - I think that this is where your problem is.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-14 04:16:35 -0500 )edit

Regarding the glance problem, I don't know, but perhaps there is more information in the glance logs.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-14 04:17:16 -0500 )edit

I will checked the endpoint list when i back to office on Monday. Thanks a lot for helping :)

xyue gravatar imagexyue ( 2017-07-14 04:28:30 -0500 )edit

I tried to access the placement api (controller:8778) through compute node web browser but it is not acccessible so i have open the port and i can see below message

{"error":{"message":"The request you have made requires authentication.","code":401, "title":"Unauthorized"}}
xyue gravatar imagexyue ( 2017-07-18 03:23:58 -0500 )edit
-1

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

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 -0500

Seen: 1,502 times

Last updated: Jul 12 '17