[Placement] Weird issue in placement-api

melanie witt melwittt at gmail.com
Sat Apr 17 20:54:07 UTC 2021


On 4/15/21 02:57, Taha Adel wrote:
> Hello,
> 
> I currently have OpenStack manually deployed by following the official 
> install documentation, but I have faced a weird situation. When I send 
> an api request to placement api service using the following command:
> 
> *curl -H "X-Auth-Token: $T" http://controller:8778 <http://controller:8778>*
> 
> I received a status code of "*200*", which indicates a successful 
> operation. But, when I issue the following request:
> 
> *curl -H "X-Auth-Token: $T" http://controller:8778/resource_providers 
> <http://controller:8778/resource_providers> *
> 
> I received a status code of "*503*", and when I checked the logs of 
> placement and keystone, they say that the authentication failed. For the 
> same reason, nova-compute can't register itself as a resource provider.
> 
> I'm sure that the authentication credentials for placement are set 
> properly, but I don't know what's the problem.
I think what you're seeing is expected behavior, the root in the API 
doesn't require authentication [1]:

"Does not perform verification of authentication tokens for root in the 
API."

so you will get 200 at the root but can get 503 for all other paths if 
there's an auth issue.

Have you looked at the placement-api logs to see if there's additional 
info there? You can also try enabling log level DEBUG by setting 
[DEFAULT]debug = True in placement.conf.

HTH,
-melanie

[1] 
https://github.com/openstack/placement/blob/6f00ba5f685183539d0ebf62a4741f2f6930e051/placement/auth.py#L90-L94




More information about the openstack-discuss mailing list