authentication code hangs when there are three or more admin keystone endpoints
Bug Description
I'm running stable/pike devstack, and I was playing around with what happens when there are many endpoints in multiple regions, and I stumbled over a scenario where the keystone authentication code hangs.
My original endpoint list looked like this:
ubuntu@
+------
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+------
| 0a9979ebfdbf48c
| 11d5507afe2a4ed
| 1e42cf139398405
| 2daf99edecae4af
| 2ece52e8bbb34d4
| 4835a089666a4b0
| 78e9fbc0a476422
| 96a1e503dc0e452
| a1887dbc8c5e4af
| b7d5938141694a4
| bb169382cbea471
| e01c8d8e08874d6
| f94c96ed474249a
+------
I was able to successfully run the following python code:
from keystoneauth1 import loading
from keystoneauth1 import loading
from keystoneauth1 import session
from keystoneclient.v3 import client
loader = loading.
auth = loader.
sess = session.
keystone = client.
keystone.
I then duplicated all of the endpoints in a new region "region2", and was able to run the python code. When I duplicated all the endpoints again in a new region "region3" (for a total of 39 endpoints) the python code hung at the final line.
Removing all the "region3" endpoints allowed the python code to work again.
During all of this the command "openstack endpoint list" worked fine.
Further testing seems to indicate that it is the third "admin" keystone endpoint that is causing the problem. I can add multiple "public" keystone endpoints, but three or more "admin" keystone endpoints cause the python code to hang.
I can't reproduce in my env(master branch). This is what i did:
test_create_
for i in compute volume image swift network identity ;
do
for j in RegionTwo RegionThree ;
do
for k in admin public internal ;
do
openstack endpoint create $i --region $j $k http://
done
done
done
kc_test.py:
from keystoneauth1 import loading
from keystoneauth1 import loading
from keystoneauth1 import session
from keystoneclient.v3 import client
loader = loading.
auth = loader.
sess = session.
keystone = client.
result = keystone.
print(result)
There are three region and 54 endpoints. But everything works well. Did I miss something?
Thanks for taking a look. I'll try and reproduce with current master when I get some time, probably not till next week.
Marking as Incomplete just until we get a bit more information. Thanks for attempting to recreate!
[Expired for python-
[Expired for OpenStack Identity (keystone) because there has been no activity for 60 days.]
It sounds like the client is having a hard time dealing with that specific data set. I'm not sure if the keystone service itself can do anything about that.
Adding python-
keystoneclient to this bug report until we figure out exactly what's going on.