Add ability to specify the endpoint name for a service

Bug #1486834 reported by Daryl Walleck
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Franklin Naval

Bug Description

I've run into an issue running tests in environments where the service catalog contains more than one endpoint of the same type (ex. multiple endpoints of the type "compute"). The endpoint that ends up being tested is the one that appears first in the catalog. Tempest already allows the type for each service to be configurable (https://github.com/openstack/tempest/blob/master/tempest/config.py#L283), so it would make sense to allow the name to be configurable as well. An accompanying change would be necessary in tempest-lib to check for the endpoint name (https://github.com/openstack/tempest/blob/master/tempest/config.py#L283 and https://github.com/openstack/tempest-lib/blob/master/tempest_lib/auth.py#L406).

Daryl Walleck (dwalleck)
Changed in tempest:
assignee: nobody → Daryl Walleck (dwalleck)
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

So keystone allows to register multiple services with same service "type" and "name" and further it allows multiple endpoints with same "endpoint_type", "region" for single service.

And currently Tempest/Tempest-lib allows "service type", "endpoint_type" and "region" as configurable to select the base url.

 > so it would make sense to allow the name to be configurable as well
I did not get how name will fully solve the above case. If someone have same service name also then again same issue.

I think what we can do is, allow endpoint UUID as configurable which will be unique in all cases if user want to use specific endpoint. And if UUID is not present then go with the current logic means first endpoints based on provided configurable options.

Apart from that just interested to know what is exact use case of having multiple services with same "type" & "name" and each with multiple endpoints of same "region", "endpoint_type" ?

Changed in tempest:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest-lib (master)

Fix proposed to branch: master
Review: https://review.openstack.org/278618

Changed in tempest:
assignee: Daryl Walleck (dwalleck) → Eric Wehrmeister (eric-wehrmeister)
status: Triaged → In Progress
Revision history for this message
Sean M. Collins (scollins) wrote :

Is this realistic though? Having multiple entries in the service catalog for a region - that are the same endpoint_type is very odd, and I think is a bug in Keystone. Fixing this in tempest-lib just means we're making something in tempest-lib work that is really a bug in another component.

Revision history for this message
Eric Wehrmeister (eric-wehrmeister) wrote :

I think this is realistic. Sometimes a service (maybe an older version) won't have a region specified. If the region isn't specified the first one will be returned which isn't always ideal. I think both Daryl who reported the bug and myself have run into this problem before. If we can specify the name it gives the user more control over which endpoint they use. Since we already can filter on type and region I think it makes sense for us to be able to filter on the name.

Revision history for this message
Sean M. Collins (scollins) wrote :

At least in DevStack, from at least the Essex era, when creating the endpoints a region was specified. "RegionOne" - and all endpoints were created under that region. Really the only service that should be regionless is KeyStone itself. Everything else should have an endpoint scoped to a region. Swift is a little funky because you could have a single swift endpoint that handles everything, like Keystone, but that's about it.

Revision history for this message
Paul Glass (pnglass) wrote :

The problem is this prohibits test from being run because, in some cases (dependent on my deployment of openstack), the test framework doesn't have sufficient tools to specify the intended url to grab from keystone.

If it's considered inappropriate (or if it's a bug) to have regionless endpoints, that's fine. But if I have a deployment with multiple entries for a region, and I need to select among those in order to run tests, how do I accomplish that? Amending the test framework (in a backwards-compatible way) with more powerful endpoint selection seems perfectly reasonable to me.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/284273

Revision history for this message
Sean M. Collins (scollins) wrote :

@Paul - are you able to provide the sanitized output of your catalog, so we can get an idea of what is going on?

Revision history for this message
Eric Wehrmeister (eric-wehrmeister) wrote :

What if, for example, somebody's deployment has multiple compute endpoints in one region? One endpoint may be pointing to an older version, and another may be pointing to the current version. (Hypothetical)

However, in my opinion I think we should have the option to filter by name anyways. We can filter by other endpoint attributes, why not give the user more power by letting them filter by name? Whether or not you believe a deployment can have regionless endpoints, or multiple endpoints at the same region, being able to filter by name only helps people that are using tempest to grab the right endpoint from keystone. They don't have to filter by name if they don't want to, but if that is easiest for them, great!

Revision history for this message
Franklin Naval (franknaval) wrote :

This issue is currently affecting me also. I have several 'network' catalog types with each having the same region. The only way I can distinguish between them is by the catalog name.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/315319

Changed in tempest:
assignee: Eric Wehrmeister (eric-wehrmeister) → Franklin Naval (franknaval)
Revision history for this message
Eric Wehrmeister (eric-wehrmeister) wrote :

Hi Franklin, I already have a Fix open here: https://review.openstack.org/#/c/284273/1

Changed in tempest:
assignee: Franklin Naval (franknaval) → Eric Wehrmeister (eric-wehrmeister)
Changed in tempest:
assignee: Eric Wehrmeister (eric-wehrmeister) → Franklin Naval (franknaval)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Franklin Naval (<email address hidden>) on branch: master
Review: https://review.openstack.org/315319
Reason: merging to Ife6d435e2aa84153d8717463930d45e5f21272f7

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/284273
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=54c7bd498249c021334ac90009bfe174bc551b96
Submitter: Jenkins
Branch: master

commit 54c7bd498249c021334ac90009bfe174bc551b96
Author: Eric Wehrmeister <email address hidden>
Date: Wed Feb 24 11:11:07 2016 -0600

    Allows specifying a name for a particular endpoint.

    Previously, if there were multiple endpoints with the same type and region,
    or without a region, the first endpoint would be returned. Now,
    by specifying the name, a specific one can be used.

    Co-Authored-By: Franklin Naval <email address hidden>

    Change-Id: Ife6d435e2aa84153d8717463930d45e5f21272f7
    Closes-Bug: #1486834

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest-lib (master)

Change abandoned by Matthew Treinish (<email address hidden>) on branch: master
Review: https://review.openstack.org/278618

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.