Placement API problem [closed]

asked 2019-03-19 10:55:32 -0500

Tomas Cribb gravatar image

updated 2019-03-20 06:47:56 -0500

I've installed Rocky on Ubuntu 18.04, when I run "nova-status --debug upgrade check" Placement API reports Failure but when I use de API using curl and I see than de API work correctly. When I create an instance I get "NoValidHost_Remote: No valid host was found." error in nova-conductor log.

Commands:

sudo nova-status --debug upgrade check Deprecated: Option "enable" from group "cells" is deprecated for removal (Cells v1 is being replaced with Cells v2.). Its value may be silently ignored in the future. +--------------------------------------------+ | Upgrade Check Results | +--------------------------------------------+ | Check: Cells v2 | | Result: Success | | Details: None | +--------------------------------------------+ | Check: Placement API | | Result: Failure | | Details: Placement API endpoint not found. | +--------------------------------------------+ | Check: Resource Providers | | Result: Success | | Details: None | +--------------------------------------------+ | Check: Ironic Flavor Migration | | Result: Success | | Details: None | +--------------------------------------------+ | Check: API Service Version | | Result: Success | | Details: None | +--------------------------------------------+ | Check: Request Spec Migration | | Result: Success | | Details: None | +--------------------------------------------+ | Check: Console Auths | | Result: Success | | Details: None | +--------------------------------------------+

root@control01:/home/administrador# PLACEMENT_ENDPOINT=http://control01:8778 root@control01:/home/administrador# openstack token issue -f value -c id gAAAAABckPf34mTS3SRZeYNIbT4is7DeL8K4PSgTwgb1YE_iwkygu-M-ihSSSoRUebjF1YLbi6CdF_zF3F6pDf3lw2Au5MDepTqtMLqGKuHC92oM-cS6VnFFVvbgr5pVDOzfcAYrtzDRhSdfpr36zHp3IuTh6T0t_yFsGgU1fUfS_7Fz13V4g1s root@control01:/home/administrador# TOKEN=gAAAAABckPf34mTS3SRZeYNIbT4is7DeL8K4PSgTwgb1YE_iwkygu-M-ihSSSoRUebjF1YLbi6CdF_zF3F6pDf3lw2Au5MDepTqtMLqGKuHC92oM-cS6VnFFVvbgr5pVDOzfcAYrtzDRhSdfpr36zHp3IuTh6T0t_yFsGgU1fUfS_7Fz13V4g1s root@control01:/home/administrador# curl ${PLACEMENT_ENDPOINT}/resource_providers/747ec20e-c252-4d49-a050-8e3cc63d3947/inventories -H "x-auth-token: $TOKEN" | python -m json.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 399 100 399 0 0 593 0 --:--:-- --:--:-- --:--:-- 593 { "inventories": { "DISK_GB": { "allocation_ratio": 1.0, "max_unit": 3, "min_unit": 1, "reserved": 0, "step_size": 1, "total": 3 }, "MEMORY_MB": { "allocation_ratio": 1.5, "max_unit": 386931, "min_unit": 1, "reserved": 512, "step_size": 1, "total": 386931 }, "VCPU": { "allocation_ratio": 16.0, "max_unit": 32, "min_unit": 1, "reserved": 0, "step_size": 1, "total": 32 } }, "resource_provider_generation": 2 }

root@control01:/home/administrador# openstack catalog list | grep http://control01:8778 | | | admin: http://control01:8778 | | | | internal: http://control01:8778 | | | | public: http://control01:8778 |

root@control01:/home/administrador# openstack endpoint list | grep http://control01:8778 | 2eebe745e8624fdfad661d74260d578c | RegionOne | placement | placement | True | admin | http://control01:8778 | | 3cf052ab1bb64346a24198f1af1c61a0 | RegionOne | placement | placement | True | internal | http://control01:8778 | | faf306c9b8154528bfe0b3a26d149a77 | RegionOne | placement | placement | True | public | http://control01:8778 |

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Tomas Cribb
close date 2019-03-22 07:54:53.344442

Comments

You know that the Placement endpoint is http://control01:8778. nova-status doesn’t. What endpoint is in the catalog? Use openstack endpoint list or openstack catalog list.

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-19 16:57:46 -0500 )edit

Both commands reported right endpoint.

Tomas Cribb gravatar imageTomas Cribb ( 2019-03-20 06:46:18 -0500 )edit

Looking at the source, nova-status seems to rely on information in nova.conf rather than the catalog to access the Placement API. I guess something is wrong in the nova.conf [placement] section.

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-20 18:20:25 -0500 )edit

nova-status calls get_ksa_adapter (see _check_placement()), which is defined in utils.py.

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-20 18:23:00 -0500 )edit

Thank you Bernd, you are right. The problem was in nova.conf.

Tomas Cribb gravatar imageTomas Cribb ( 2019-03-22 07:54:20 -0500 )edit