Ask Your Question
0

Device block mapping error ---> no valid hosts found

asked 2016-12-24 06:41:42 -0500

segaps gravatar image

Hey all,

So off doing my best to try and accustom myself with openstack by creating a few environments. I was following the guide(s) here http://www.tecmint.com/openstack-networking-guide/ (http://www.tecmint.com/openstack-netw...) --> http://www.tecmint.com/create-deploy-and-launch-virtual-machines-in-openstack/ (http://www.tecmint.com/create-deploy-...) but getting errors once I actually try and launch the instance.

I've been trawling through posts online trying to solve the issue but I can't seem to find the silver bullet which is working for others.

If I create the instance first I would get "Block Device Mapping" is invalid. But I see in the volumes that the volume is created and available for use. Following advice from this answer https://ask.openstack.org/en/question/62636/instance-creation-fails-block-device-mapping/ (https://ask.openstack.org/en/question...) I tried altering the nova.conf file

block_device_allocate_retries = 60 (default) to 300
block_device_allocate_retries_interval = 3(default) to 10 
block_device_creation_timeout = 10(default) to 300

and then restarting

service openstack-nova-scheduler restart
service openstack-nova-conductor restart

So then tried it again and same issue I can see that one volume is successfully created , but if I try to launch more the other volumes show in error.

Then following that answer I saw that some people had success through deleting the instance and launching the instance from the volume which was created. But that leads to a No Valid hosts error.

Although I'm tempted to debug this issue I feel the underlying problem of not being able to create the volumes is a bigger issue without the "workaround"

It shouldn't be a resources problem... The box I'm working off

[root@openstack ~]# nproc
48
[root@openstack ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:            251          43         189           0          19         206
Swap:             3           0           3
[root@openstack ~]# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/centos_openstack-root   50G   20G   31G  40% /
devtmpfs                           126G     0  126G   0% /dev
tmpfs                              126G  4.0K  126G   1% /dev/shm
tmpfs                              126G  202M  126G   1% /run
tmpfs                              126G     0  126G   0% /sys/fs/cgroup
/dev/nvme0n1p2                     497M  165M  332M  34% /boot
/dev/nvme0n1p1                     200M  9.5M  191M   5% /boot/efi
/dev/loop0                         1.9G  6.1M  1.7G   1% /srv/node/swiftloopback
/dev/mapper/centos_openstack-home  5.5T   33M  5.5T   1% /home
tmpfs                               26G     0   26G   0% /run/user/1000
tmpfs                               26G     0   26G   0% /run/user/0

I notice this in the nova-conductor log

2016-12-24 12:32:00.979 22560 WARNING nova.scheduler.utils [req-3b86256a-7e79-4c17-88db-05f2cbbead3a b56eb420714b4158aa9bd202ce928e71 7df1ecb81c0749bfb5b7542a64d82b96 - - -] Failed to compute_task_build_instances: No valid host was found. There are not enough hosts available.
Traceback (most recent call last):

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

  File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 104, in select_destinations
    dests = self.driver.select_destinations(ctxt, spec_obj)

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

NoValidHost: No valid host was found. There are not enough ...
(more)
edit retag flag offensive close merge delete

Comments

'No valid host' is likely due to RetryFilter - there were attempts See nova-compute logs (debug logging on)+Logical volume/physical volume-related stuff on compute Maybe: https://ask.openstack.org/en/question...

volenbovsky gravatar imagevolenbovsky ( 2016-12-24 13:42:15 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2016-12-25 22:59:14 -0500

silently gravatar image

many resons cause this erro,

check your service and log file :

1 nova.log 2 nova-compute.log nova-consoleauth.log nova-novncproxy.log privsep-helper.log nova-api.log nova-conductor.log nova-network.log nova-scheduler.log

3 dhcp-agent.log linuxbridge-agent.log metadata-agent.log

4 dhcp-agent.log neutron-ns-metadata-proxy-7b735b6b-da0e-4727-a954-7e9b5d20ae24.log l3-agent.log neutron-ns-metadata-proxy-a0253303-cef8-45b7-b29f-88bc74a14cce.log linuxbridge-agent.log neutron-ns-metadata-proxy-b8f90942-82e6-422b-a931-df38fe3232d1.log metadata-agent.log server.log

5 nova hypervisor-list

......

I solve this error many times .

edit flag offensive delete link more

Comments

Thank you for this response, although it didn't resolve my issue marking this as the answer because it gives others a great list of things to check out

segaps gravatar imagesegaps ( 2016-12-28 03:24:55 -0500 )edit
0

answered 2016-12-28 03:26:40 -0500

segaps gravatar image

So for me it seems I ran into this bug

https://bugs.launchpad.net/horizon/+bug/1431260 (https://bugs.launchpad.net/horizon/+b...)

Basically I can't create create the instance from scratch and need to create the volume first which is really annoying. I'll keep trying to find a workaround for it and will post back if I find anything

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

1 follower

Stats

Asked: 2016-12-24 06:41:42 -0500

Seen: 264 times

Last updated: Dec 28 '16