Ask Your Question
0

Openstack queen instance creation error - No valid host was found.

asked 2018-07-05 00:56:45 -0500

gaurav.mittal gravatar image

updated 2018-07-06 22:07:19 -0500

Hi,

I have Del R603 Server with 16 CPU 64GB RAM and 600GB - 3NOS HDD.

I have 2 interfaces em1 and em2 having the network interface as 10.211.5.111 and 10.211.15.111.

I have installed the packstack queen using the following command.

systemctl stop firewalld
systemctl disable firewalld
systemctl stop NetworkManager
systemctl disable NetworkManager

yum upgrade -y
yum install -y centos-release-openstack-queen
yum install -y openstack-packstack
yum install -y python-openstackclient

Using the Answer file i have installed the openstack. Installation completed successfully. Now when I try to create a Instance and its giving error as No valid host was found.

Message New - Error - in compute.log

2018-07-06 18:31:57.096 3227 ERROR nova.scheduler.client.report [req-37c7a3df-ad11-41f5-8f34-e144a1a008e4 - - - - -] [req-877fa231-f216-4a58-aa88-ca0cbacf4bee] Failed to create resource provider record in placement API for UUID 3c73b479-32a0-4ae2-a46c-ba35cda98d54. Got 409: {"errors": [{"status": 409, "request_id": "req-877fa231-f216-4a58-aa88-ca0cbacf4bee", "detail": "There was a conflict when trying to complete your request.\n\n Conflicting resource provider name: openstack already exists.  ", "title": "Conflict"}]}.
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager [req-37c7a3df-ad11-41f5-8f34-e144a1a008e4 - - - - -] Error updating resources for node openstack.: ResourceProviderCreationFailed: Failed to create resource provider openstack
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager Traceback (most recent call last):
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7284, in update_available_resource_for_node
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     rt.update_available_resource(context, nodename)
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 680, in update_available_resource
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     self._update_available_resource(context, resources)
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     return f(*args, **kwargs)
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 704, in _update_available_resource
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     self._init_compute_node(context, resources)
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 561, in _init_compute_node
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     self._update(context, cn)
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 878, in _update
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     inv_data,
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 68, in set_inventory_for_provider
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     parent_provider_uuid=parent_provider_uuid,
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 37, in __run_method
2018-07-06 18:31:57.097 3227 ERROR nova.compute.manager     return getattr ...
(more)
edit retag flag offensive close merge delete

Comments

This error means that you don't have enough resources, usually RAM or Storage, to run the instance. Wrong CPU architecture is another possibility.

How did you launch the instance?

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-05 04:01:16 -0500 )edit

Thanks a lot for replying. But this is the first VM that I am creating after the Pack stack is installed. Resources wise we have 16CPU and 64 GB RAM and 1.6T disk visible in Openstack Console.

And we are creating a VM with 2 CPU, 10GB RAM and 50 GB HDD.

gaurav.mittal gravatar imagegaurav.mittal ( 2018-07-05 04:29:07 -0500 )edit

On the same server we have OCATA installed and everything was working fine. we were able to create multiple instances. But now i have newly installed queen after flashing the server again with the same OS.

I am suspecting some configuration issue, Can you kindly help.

gaurav.mittal gravatar imagegaurav.mittal ( 2018-07-05 04:30:28 -0500 )edit

Enable debug logging for Nova and check the Nova scheduler log, perhaps also the Placement log. One of the two logs should tell you which scheduling filter(s) reject(s) the instance.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-05 06:50:47 -0500 )edit

Error in the nova-compute.log ERROR nova.scheduler.client.report [req-37c7a3df-ad11-41f5-8f34-e144a1a008e4 - - - - -] [req-ead2866f-9a4e-4cee-9151-026d69a6a136] Failed to create resource provider record in placement API for UUID 3c73b479-32a0-4ae2-a46c-ba35cda98d54. Got 409: {"errors": [{"status":

gaurav.mittal gravatar imagegaurav.mittal ( 2018-07-06 07:13:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-07-06 20:13:44 -0500

updated 2018-07-06 22:49:22 -0500

I don't have a definite answer, but a lot to write, so I am using the answer field.

It would appear that the Placement service has already an entry with the name of your compute host, openstack. This is strange; I speculate that you installed Packstack once, perhaps incompletely. This filled the Placement database, then you performed another installation on top of that.

Below are my suggestions for repairing your current situation. I think it's a useful exercise with a learning effect, but you may also opt for simply doing a reinstallation from scratch (i.e., reinstall the OS to ensure everything is wiped out, then Packstack).

The Placement service has a CLI, but I didn't get it to work on my Queens-based devstack. The command to list the resource providers is openstack resource providers list. If that doesn't work, use the API:

$ openstack catalog list
$ PLACEMENT_ENDPOINT=placement-endpoint-returned-by-previous-command
$ openstack token issue -f value -c id
$ TOKEN=the-token-returned-by-the-previous-command
$ curl ${PLACEMENT_ENDPOINT}/resource_providers -H "x-auth-token: $TOKEN" | python -m json.tool

This returns the resource provider's UUID. Under normal circumstances, it should be the same as the UUID returned by nova hypervisor-list. My guess is that it is not so in your case.

Armed with this UUID, you can remove the resource provider, then restart nova-compute. My hope is that it can register with the Placement service at this point.

The API to delete a resource provider:

$ UUID=uuid-of-resource-provider-named-openstack
$ curl ${PLACEMENT_ENDPOINT}/resource_providers/$UUID -H "x-auth-token: $TOKEN" -X DELETE

In case this doesn't work because there are allocations, list those allocations:

$ curl ${PLACEMENT_ENDPOINT}/resource_providers/${UUID}/allocations -H "x-auth-token: $TOKEN"

This returns a list of the instance(s) that use(s) this resource provider. Delete those instances. If they don't exist (likely), delete the allocations:

$ CONSUMER=uuid-of-allocation-consumer-from-previous-API
$ curl ${PLACEMENT_ENDPOINT}/allocations/$CONSUMER -H "x-auth-token: $TOKEN" -X DELETE

I have successfully tested these steps on the above-mentioned Devstack, except for the last one.

EDIT:

Your scenario fits my speculation. You installed Packstack once, creating a Placement service record for openstack. Then you installed it again without resetting the database. When your host tries to register with the Placement service, this fails because of the pre-existing resource provider record.

Now, you fixed the Placement problem, but I fear you will run into other problems caused by installing Packstack on an existing database.

How I learned all that? Thanks for flattering me. I started learning OpenStack about 4.5 years ago in order to teach training courses. Apart from curiosity, expanding my business was a great motivator:) The learning curve was steep but fun. OpenStack continues to be a hobby and also brings in some revenue. Hire me :)

I also learn a lot by answering questions on ask.openstack.org. Thanks to your problem, for example, I know now that there is a Placement CLI, even though it doesn't work on my cloud. Perhaps it needs Rocky, or it's requires additional work for setting up.

docs.openstack.orgcontains 80% of ... (more)

edit flag offensive delete link more

Comments

I did the sam execution and it worked. But I had a question... How do you learn all this to debug and fix. I have attached the exection output. Please have a look if possible.

gaurav.mittal gravatar imagegaurav.mittal ( 2018-07-06 21:58:52 -0500 )edit

Gaurav, well done. I added a few pointers for learning about OpenStack to my answer.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-06 22:49:51 -0500 )edit

Thanks a lot for all the help. But do you suggest me go reflash the OS and install the again. I still have another issue where i am not able to add an OVA file in the images from dashboard. An unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administr

gaurav.mittal gravatar imagegaurav.mittal ( 2018-07-06 23:13:10 -0500 )edit

Yes, it's better to start from scratch. Who knows what other unwanted data you have in your database.

Whether the image problem is related, I can't say. As always, check the logs - in this case the Glance API log for a start. Also try the equivalent command from the command line.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-07 00:25:17 -0500 )edit

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: 2018-07-05 00:56:45 -0500

Seen: 547 times

Last updated: Jul 06