Ask Your Question
1

my instance creation fails and logs reveals ""No valid host was found. There are not enough hosts available"

asked 2015-07-28 05:55:51 -0600

Nithin gravatar image

its a typical four node environment, running with one controller, compute , network and block nodes.

Error during instance creation

#

created | 2015-07-28T20:17:54Z | | fault | {"message": "No valid host was found. There are not enough hosts available.", "code": 500, "created": "2015-07-28T20:17:59Z"} | | flavor | m1.tiny (1)

#

Nova-scheduler log from controller node 2015-07-28 16:37:25.766 3454 DEBUG nova.openstack.common.loopingcall [req-6b2d903d-8444-404d-9d47-bc4de15af81a - - - - -] Dynamic looping call <bound method="" service.periodic_tasks="" of="" <nova.service.service="" object="" at="" 0x4c0f150="">> sleeping for 16.35 seconds _inner /usr/lib/python2.7/site-packages/nova/openstack/common/loopingcall.py:132 2015-07-28 16:37:42.119 3454 DEBUG nova.openstack.common.periodic_task [req-6b2d903d-8444-404d-9d47-bc4de15af81a - - - - -] Running periodic task SchedulerManager._expire_reservations run_periodic_tasks /usr/lib/python2.7/site-packages/nova/openstack/common/periodic_task.py:219 2015-07-28 16:37:42.127 3454 DEBUG nova.openstack.common.loopingcall [req-6b2d903d-8444-404d-9d47-bc4de15af81a - - - - -] Dynamic looping call <bound method="" service.periodic_tasks="" of="" <nova.service.service="" object="" at="" 0x4c0f150="">> sleeping for 43.64 seconds _inner /usr/lib/python2.7/site-packages/nova/openstack/common/loopingcall.py:132 2015-07-28 16:37:52.081 3454 DEBUG oslo_concurrency.lockutils [req-1135e64a-cf4f-4f9f-9475-781ac92efb62 - - - - -] Lock "host_instance" acquired by "sync_instance_info" :: waited 0.000s inner /usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:444 2015-07-28 16:37:52.081 3454 INFO nova.scheduler.host_manager [req-1135e64a-cf4f-4f9f-9475-781ac92efb62 - - - - -] Successfully synced instances from host 'ameacldcompt01'. 2015-07-28 16:37:52.082 3454 DEBUG oslo_concurrency.lockutils [req-1135e64a-cf4f-4f9f-9475-781ac92efb62 - - - - -] Lock "host_instance" released by "sync_instance_info" :: held 0.001s inner /usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:456 2015-07-28 16:38:25.765 3454 DEBUG nova.openstack.common.periodic_task [req-6b2d903d-8444-404d-9d47-bc4de15af81a - - - - -] Running periodic task SchedulerManager._run_periodic_tasks run_periodic_tasks /usr/lib/python2.7/site-packages/nova/openstack/common/periodic_task.py:219 2015-07-28 16:38:25.766 3454 DEBUG nova.openstack.common.loopingcall [req-6b2d903d-8444-404d-9d47-bc4de15af81a - - - - -] Dynamic looping call <bound method="" service.periodic_tasks="" of="" <nova.service.service="" object="" at="" 0x4c0f150="">> sleeping for 17.35 seconds _inner /usr/lib/python2.7/site-packages/nova/openstack/common/loopingcall.py:132 2015-07-28 16:38:43.119 3454 DEBUG nova.openstack.common.periodic_task [req-6b2d903d-84

#

Thanks in advance, please do let me know if any other log information will be helpful for further investigation

edit retag flag offensive close merge delete

Comments

You'd better post a complete nova log or try:

cat /var/log/nova/(nova log file, e.g. nova-api.log) | grep ERROR

to find out if there's any error when creating an instance. If there are, then it's time to google it or post them here.

Cheng Liu gravatar imageCheng Liu ( 2015-07-28 06:05:49 -0600 )edit

I've solved the same error by restarting my compute.

~RP

rpga95 gravatar imagerpga95 ( 2015-07-28 12:20:34 -0600 )edit

This is what I can see in the nova-api log 2015-07-28 21:01:50.695 3589 DEBUG oslo_db.sqlalchemy.session [req-bf730853-d9fb-401c-9e67-5cda0ebf19bc 02600221979d4d24b8d10ff7eb7b7018 0f888d1e964248a69bc75d3ba29deb11 - - -] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,N

Nithin gravatar imageNithin ( 2015-07-28 23:56:01 -0600 )edit

Try to add debug parameter when you create an instance in console, and append debug info in your question.

Example:

nova boot --debug --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic netid=DEMO_NET_ID --security-group default --key-name demo-key demo-instance1
Cheng Liu gravatar imageCheng Liu ( 2015-07-29 11:10:32 -0600 )edit

nova instance creation with debug option REQ: curl -g -i -X GET http://ameacldopctrl02:8774/v2/0f888d... -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}229de6a6cb797af3322b4ceb99e17869e820768c"

Nithin gravatar imageNithin ( 2015-07-30 00:32:35 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-30 00:34:30 -0600

Nithin gravatar image

Here is nova instance creation with debug. My actual problem is instance gets created and but it will be placed in Error state.

#

DEBUG (session:195) REQ: curl -g -i -X GET http://ameacldopctrl02:8774/v2/0f888d... -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}229de6a6cb797af3322b4ceb99e17869e820768c" DEBUG (connectionpool:383) "GET /v2/0f888d1e964248a69bc75d3ba29deb11/flavors/4 HTTP/1.1" 200 431 DEBUG (session:224) RESP: [200] date: Thu, 30 Jul 2015 15:11:10 GMT connection: keep-alive content-type: application/json content-length: 431 x-compute-request-id: req-d863ea66-70b8-4d53-8efd-342cff62d933 RESP BODY: {"flavor": {"name": "m1.large", "links": [{"href": "http://ameacldopctrl02:8774/v2/0f888d1e964248a69bc75d3ba29deb11/flavors/4", "rel": "self"}, {"href": "http://ameacldopctrl02:8774/0f888d1e964248a69bc75d3ba29deb11/flavors/4", "rel": "bookmark"}], "ram": 8192, "OS-FLV-DISABLED:disabled": false, "vcpus": 4, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 80, "id": "4"}} DEBUG (session:195) REQ: curl -g -i -X GET http://ameacldopctrl02:8774/v2/0f888d... -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}229de6a6cb797af3322b4ceb99e17869e820768c" DEBUG (connectionpool:383) "GET /v2/0f888d1e964248a69bc75d3ba29deb11/images/feae1f71-da00-45e0-81a9-2d8548e867fd HTTP/1.1" 200 704 DEBUG (session:224) RESP: [200] date: Thu, 30 Jul 2015 15:11:10 GMT connection: keep-alive content-type: application/json content-length: 704 x-compute-request-id: req-df4619f9-6d8a-4821-9e71-0724f647f202 RESP BODY: {"image": {"status": "ACTIVE", "updated": "2015-07-10T19:34:22Z", "links": [{"href": "http://ameacldopctrl02:8774/v2/0f888d1e964248a69bc75d3ba29deb11/images/feae1f71-da00-45e0-81a9-2d8548e867fd", "rel": "self"}, {"href": "http://ameacldopctrl02:8774/0f888d1e964248a69bc75d3ba29deb11/images/feae1f71-da00-45e0-81a9-2d8548e867fd", "rel": "bookmark"}, {"href": "http://ameacldopctrl02:9292/images/feae1f71-da00-45e0-81a9-2d8548e867fd", "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": "feae1f71-da00-45e0-81a9-2d8548e867fd", "OS-EXT-IMG-SIZE:size": 13287936, "name": "cirros-0.3.4-x86_64", "created": "2015-07-10T19:34:22Z", "minDisk": 0, "progress": 100, "minRam": 0, "metadata": {}}}

#

nova show c3e91cb9-ce53-4eaf-9fac-913f1d80ae98 +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | Property | Value | +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | - | | OS-EXT-STS:vm_state | error | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | config_drive | | | created | 2015-07-30T15:11:10Z | | fault | {"message": "No valid host was found. There are not enough hosts available.", "code": 500, "created": "2015-07-30T15:11:18Z"} |

#
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: 2015-07-28 05:55:51 -0600

Seen: 1,339 times

Last updated: Jul 30 '15