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

Multiple endpoints found (Fog::OpenStack::Auth::Catalog::EndpointError) - not sure how to resolve #509

Closed
powerje opened this issue Jan 15, 2020 · 4 comments

Comments

@powerje
Copy link

powerje commented Jan 15, 2020

I am getting the following error when trying to use the Storage API:

gems/fog-openstack-1.0.10/lib/fog/openstack/auth/catalog.rb:68:in `get_endpoint': Multiple endpoints found (Fog::OpenStack::Auth::Catalog::EndpointError)

My code looks like:

@connection_params = {
  :openstack_auth_url   => "https://url.../auth/v2.0",
  :openstack_username   => "USERNAME",
  :openstack_tenant     => "TENANT_NAME",
  :openstack_api_key    => "KEY",
  :openstack_identity_api_version => "2.0",
}

thing = Fog::OpenStack::Storage.new(@connection_params)
p thing

I've added a print statement to catalog.rb see what endpoints are in the list:

      def get_endpoint(entries, interface, region)
        list = []
        entries.each do |type|
          next unless type.key?('endpoints')
          type['endpoints'].each do |endpoint|
            p "endpoint"
            p endpoint
            list << endpoint_url(endpoint, interface) if endpoint_match?(endpoint, interface, region)
          end
        end
        p "list"
        p list
        raise EndpointError, 'Multiple endpoints found' if list.size > 1
        list[0]
      end

Which outputs a list with 2 URLs which happen to be exactly the same, formatted like:
https://url:443/v1/<TENANT_NAME>

Is this a problem on my OpenStack providers end? Is there something I can do to make it uses a specific element in the list (which in this case is arbitrary, as they are the same)?

@powerje
Copy link
Author

powerje commented Jan 15, 2020

Seems like I could be making the same mistake as in this issue: hashicorp/terraform#3293 but I am using what I believe to be the correct auth URL (/v2.0)

@powerje powerje closed this as completed Apr 18, 2020
@ares
Copy link
Collaborator

ares commented Apr 18, 2020

@powerje have you found the cause? Thanks

@powerje
Copy link
Author

powerje commented Apr 18, 2020

It’s my understanding that this is an issue with Swiftstack who manages my cloud hosts Swift instance. They haven’t fixed it yet but I’ve moved on to another solution.

@ShamoX
Copy link
Contributor

ShamoX commented May 20, 2020

On cluster that hosts multiple endpoints you need to specify which one you want to connect to, or you'll have to manage the catalog. Isn't it your problem ?
I think you need to add openstack_region key to specify the region on which you want to work on.
Or you can do like I did on a project where I wanted to manage multiple endpoint see this issue: #467

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