Ask Your Question
0

Stein: failed to create resource provider

asked 2019-05-17 01:29:13 -0500

updated 2019-05-19 01:49:12 -0500

Hi when i tried to create the instance, it lauched with error status. i checked /var/log/nova/nova-compute.log, it shows following error.

2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-

    packages/nova/scheduler/client/report.py", line 873, in get_provider_tree_and_ensure_root
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager     parent_provider_uuid=parent_provider_uuid)
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/report.py", line 659, in _ensure_resource_provider
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager     parent_provider_uui

d=parent_provider_uuid)
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/report.py", line 71, in wrapper
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager     return f(self, *a, **k)
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager   File "/usr/lib/python2.7/site-packages/nova/scheduler/client/report.py", line 593, in _create_resource_provider
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager     raise exception.ResourceProviderCreationFailed(name=name)
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager ResourceProviderCreationFailed: Failed to create resource provider compute
    2019-05-17 10:02:58.328 10518 ERROR nova.compute.manager

when i run below command the output is as below.

[root@controller conf.d]# openstack service list
+----------------------------------+-----------+-----------+
| ID                               | Name      | Type      |
+----------------------------------+-----------+-----------+
| 2988099942a54a8bb011d5b90475ebfc | glance    | image     |
| 4e057bd2e7e74f9083637c46dfd9e13b | keystone  | identity  |
| 80e5c533b3924c3891ba674876c793a5 | placement | placement |
| b93d73ec4e574c589b1feaf33f1afde9 | neutron   | network   |
| e5497989ec2946d3866ad675767f94c4 | nova      | compute   |
+----------------------------------+-----------+-----------+

nova-sheduler.log has following content

[root@controller nova]# tail -f nova-scheduler.log
2019-05-17 09:58:41.740 22462 INFO nova.filters [req-a91178b7-dfd8-4c08-9dda-e100b798eada d1974e4832b54ba5a38a4534cc413020 cd08d7de6fc947baa4d7905134a7d011 - default default] Filter RetryFilter returned 0 hosts
2019-05-17 09:58:41.741 22462 INFO nova.filters [req-a91178b7-dfd8-4c08-9dda-e100b798eada d1974e4832b54ba5a38a4534cc413020 cd08d7de6fc947baa4d7905134a7d011 - default default] Filtering removed all hosts for the request with instance ID '424d011d-98c1-4545-b8a5-6af537fcce40'. Filter results: ['RetryFilter: (start: 0, end: 0)']

placement database's resource providers table has following content

MariaDB [placement]> select * from resource_providers;
+---------------------+---------------------+----+--------------------------------------+---------+------------+------------------+--------------------+
| created_at          | updated_at          | id | uuid                                 | name    | generation | root_provider_id | parent_provider_id |
+---------------------+---------------------+----+--------------------------------------+---------+------------+------------------+--------------------+
| 2019-05-16 08:56:23 | 2019-05-16 08:56:23 |  1 | fb1834e7-0f67-4bd1-abdf-5b4823f25243 | compute |          2 |                1 |               NULL |
+---------------------+---------------------+----+--------------------------------------+---------+------------+------------------+--------------------+

in controller's nova.conf i have configured:--

[placement]
region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = PLACEMENT_DBPASS


[placement_database]
connection = mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api

and in compute node's nova.conf

[placement]
region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:5000/v3
username = placement
password = PLACEMENT_DBPASS

BUT NOVA_API database has resource_providers table empty,

MariaDB [nova_api]> select * from resource_providers  ;
Empty set (0.000 sec)


[root@controller openstackusr]# su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell 'cell1': 9f8dd40e-1fc4-4f5d-89bb-a48640069162
Found 0 unmapped computes in cell: 9f8dd40e-1fc4-4f5d-89bb-a48640069162

please help me out.

edit retag flag offensive close merge delete

Comments

https://docs.openstack.org/placement/stein/install/verify.html (https://docs.openstack.org/placement/...)

all the commands in placement service verification succeeds, but still i have above issue.

Spoorthi Vaidya gravatar imageSpoorthi Vaidya ( 2019-05-17 00:35:19 -0500 )edit

in /etc/httpd/conf.d/ 00-nova-placement-api.conf file is missing.

But instead i have 00-placement-api.conf. is that the reason?

Spoorthi Vaidya gravatar imageSpoorthi Vaidya ( 2019-05-17 00:37:05 -0500 )edit

<directory usr="" bin=""> <ifversion &gt;="2.4"> Require all granted </ifversion> <ifversion &lt;="" 2.4=""> Order allow,deny Allow from all </ifversion> </directory>

the above lines i have also added in /etc/httpd/conf.d/00-placement-api.conf file.

Spoorthi Vaidya gravatar imageSpoorthi Vaidya ( 2019-05-17 00:38:54 -0500 )edit

But still im facing the issue i have mentioned in the above question.

Spoorthi Vaidya gravatar imageSpoorthi Vaidya ( 2019-05-17 00:39:26 -0500 )edit

The Placement database can be queried using the openstack client: https://docs.openstack.org/osc-placem..., so you don't need to look into the database. Also, Stein is the first release that allows Placement to be separate from Nova and have its own database.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-17 01:44:54 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2019-05-19 02:03:50 -0500

The problem is solved.

  2019-05-19 10:48:24.283 10518 ERROR nova.compute.resource_tracker [req-4d4dab18-2b5a-4d35-834c-d4a224fdb6be - - - - -] Skipping removal of allocations for deleted instances: Failed to retrieve allocations for resource provider 46e7f4c0-4592-4e90-ad12-21e503773131: {"errors": [{"status": 404, "request_id": "req-7b9ddbdb-83e3-4b91-b0f1-c74017e1d2dd", "detail": "The resource could not be found.\n\n Resource provider '46e7f4c0-4592-4e90-ad12-21e503773131' not found: No resource provider with uuid 46e7f4c0-4592-4e90-ad12-21e503773131 found  ", "title": "Not Found"}]}: ResourceProviderAllocationRetrievalFailed: Failed to retrieve allocations for resource provider 46e7f4c0-4592-4e90-ad12-21e503773131: {"errors": [{"status": 404, "request_id": "req-7b9ddbdb-83e3-4b91-b0f1-c74017e1d2dd", "detail": "The resource could not be found.\n\n Resource provider '46e7f4c0-4592-4e90-ad12-21e503773131' not found: No resource provider with uuid 46e7f4c0-4592-4e90-ad12-21e503773131 found  ", "title": "Not Found"}]}
    2019-05-19 10:48:24.331 10518 ERROR nova.scheduler.client.report [req-4d4dab18-2b5a-4d35-834c-d4a224fdb6be - - - - -] [req-4ef7b386-65ab-4da8-8028-63e4ec506ccd] Failed to create resource provider record in placement API for UUID 46e7f4c0-4592-4e90-ad12-21e503773131. Got 409: {"errors": [{"status": 409, "request_id": "req-4ef7b386-65ab-4da8-8028-63e4ec506ccd", "detail": "There was a conflict when trying to complete your request.\n\n Conflicting resource provider name: compute already exists.  ", "title": "Conflict"}]}.

I had the above error in the nova-compute log.

when i checked in the nova database, compute nodes table, UUID of compute node was different from UUID of resource providers in the placement table

  https://ask.openstack.org/en/question/115081/openstack-queen-instance-creation-error-no-valid-host-was-found/

according the ans provided by BERND in above link,

i followed the below steps:

  $ 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
$ UUID=uuid-of-resource-provider-named-openstack
$ curl ${PLACEMENT_ENDPOINT}/resource_providers/$UUID -H "x-auth-token: $TOKEN" -X DELETE

after performing above steps, when i checked the resource providers table in placement database, it updated UUID of resource_provider to UUID of compute node in the compute_nodes table of nova db. Now im able to launch instance with active status.

THANKS TO BERND BAUSCH @Bernd Bausch

edit flag offensive delete link more

Comments

My thinking why this happened: The compute node tried to re-register with the Placement service, perhaps after you re-installed it. The old UUID was in the Placement database, the new UUID in Nova’s DB tables.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-19 18:36:15 -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: 2019-05-17 00:26:09 -0500

Seen: 148 times

Last updated: May 19