Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'No endpoint match' exception for Multiple region '*' #467

Open
PratikAwchat opened this issue Nov 28, 2018 · 4 comments
Open

'No endpoint match' exception for Multiple region '*' #467

PratikAwchat opened this issue Nov 28, 2018 · 4 comments

Comments

@PratikAwchat
Copy link

PratikAwchat commented Nov 28, 2018

I am working on OpenStack based cloud, in which it supports multiple regions; getting region as * in response of type 'Identity'.

response: {"endpoints"=>[{"region_id"=>"*", "id"=>"h65y65456f54r5t565tg65t67515vjhf", "region"=>"*", "interface"=>"public", "url"=>"https://iam.sa-brazil-1.dummy_cloud_provider.com/v3"}], "name"=>"keystone", "id"=>"bdsg767t47ghjfbv474778jhbfvhb74j", "type"=>"identity"}"

Due to * in the "region", it throws exception: 'No endpoint match'.
When i tried to replace * with region name 'sa-brazil-1', it works fine.
Can you please guide for the same and let me know the purpose of *?

@ShamoX
Copy link
Contributor

ShamoX commented Jan 3, 2019

Hi, I have the same problem.
In my opinion it is related to the fact that you can't connect to multiple regions when there is. You have to choose one.
If you find a way to be able to detect all the regions, I'd like to know :)
I wanted to create a region unrelated API for OpenStack but I need to pass the regions name as a parameter which kind of break the behavior I wanted...

@ShamoX
Copy link
Contributor

ShamoX commented Mar 4, 2019

Ok, I found a way. In the project we created for this purpose (managing multiple regions Openstack provider) I used the direct access to Fog::OpenStack::Auth::Token.build method to create a token that I keep, and then get the list of regions that the user has the right to access. This is managed in that file : https://gitlab.com/rol-public/openstack-router/blob/master/lib/openstack-router/catalog.rb

@ShamoX
Copy link
Contributor

ShamoX commented Mar 4, 2019

I'll need to test my code, so I begin to think about improving the MOCK of OpenStack to test some of the methods in this library (some code are uncovered, because the MOCK of Fog-openstack is not complete).

@gildub
Copy link
Collaborator

gildub commented Mar 7, 2019

As far as I remember the region which is null by default must be specified if they are multiple regions.
Basically if there is only one region the endpoint will be found without ambiguity (therefore the region doesn't matter) otherwise the region has to be specified.

From that being able to get all regions requires effectively a dedicated method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants