service is included in V3 catalog even with no endpoints

Bug #1436704 reported by Dave Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Won't Fix
Wishlist
Unassigned

Bug Description

This is actually the following up of the comment in this patch (https://review.openstack.org/#/c/144860/19/keystone/catalog/backends/sql.py).

In current source, we just keep the service in the catalog with no endpoints, we should skip the services as Henry's comments.

Dave Chen (wei-d-chen)
Changed in keystone:
assignee: nobody → Dave Chen (wei-d-chen)
Revision history for this message
David Stanek (dstanek) wrote :

Dave, if this is something that you are working on feel free to mark it as In Progress.

Changed in keystone:
importance: Undecided → Low
Revision history for this message
David Charles Kennedy (dkennedy-p) wrote :

My patch set to move the endpoint filtering into the default driver might address this for the v3 catalog where a filtered catalog is returned. The only time that services without endpoints may be returned would be where the catalog is empty due to filtering and keystone is configured to return an unfiltered catalog.

https://review.openstack.org/#/c/167675/5

I only mention this to avoid a potential duplication of effort.

Revision history for this message
Dave Chen (wei-d-chen) wrote :

@David, I will watch that patch, thanks for the information.

Revision history for this message
David Charles Kennedy (dkennedy-p) wrote :

I'm a bit puzzled about this. I can make this work with my patch set for endpoint filtering by simply using .join for the query (which does an inner join between Service and Endpoint rather than adding the .options(joined_load) which does a left outer join. No endpoints = no service. But doesn't that remove the value of CONF.endpoint_filter.return_all_endpoints_if_no_filter = True? In the case of the left outer join if the filtered list is empty then the unfiltered service list would only contain services for which there are no endpoints assigned to the project - in which Henry's comment suggests we shouldn't return them anyway.

I presume that configuration property is there for a reason - though I can't fathom what that might be.

Changed in keystone:
assignee: Dave Chen (wei-d-chen) → David Charles Kennedy (dkennedy-p)
status: New → In Progress
Changed in keystone:
assignee: David Charles Kennedy (dkennedy-p) → Guang Yee (guang-yee)
Changed in keystone:
assignee: Guang Yee (guang-yee) → David Charles Kennedy (dkennedy-p)
Revision history for this message
Dave Chen (wei-d-chen) wrote :

@David Charles Kennedy, acutally, this bug existed in both SQL and templates.

If this bug bloats your patch (https://review.openstack.org/#/c/167675/), maybe you can consider to address it in a separated patch.

Revision history for this message
Dave Chen (wei-d-chen) wrote :

The issue may happened after URL formatting as long as all of the URLs has none suitable replacement.

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

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

Changed in keystone:
assignee: David Charles Kennedy (dkennedy-p) → Dave Chen (wei-d-chen)
Dave Chen (wei-d-chen)
Changed in keystone:
assignee: Dave Chen (wei-d-chen) → David Charles Kennedy (dkennedy-p)
Changed in keystone:
assignee: David Charles Kennedy (dkennedy-p) → Dave Chen (wei-d-chen)
Dave Chen (wei-d-chen)
Changed in keystone:
assignee: Dave Chen (wei-d-chen) → David Charles Kennedy (dkennedy-p)
Revision history for this message
Sean Perry (sean-perry-a) wrote :

I am currently working on this in order to get #1405574 resolved.

@dkennedy, may I reassign?

Revision history for this message
David Charles Kennedy (dkennedy-p) wrote :

By all means @sean-perry as I have limited bandwidth for this right now. The patch set I submitted is functional but it has been suggested that I re-write to implement a builder for the catalogs, which makes sense. It's also dependent on another patch but you might like to take a look:
https://review.openstack.org/#/c/176383/

Revision history for this message
Steve Martinelli (stevemar) wrote :

unassigning due to inactivity

Changed in keystone:
importance: Low → Wishlist
assignee: David Charles Kennedy (dkennedy-p) → nobody
status: In Progress → Triaged
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

This is being marked as "wont fix" since it is a behavior we currently have. Changing it would be incompatible.

Changed in keystone:
status: Triaged → Won't Fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Morgan Fainberg (<email address hidden>) on branch: master
Review: https://review.openstack.org/176383
Reason: administrative abandoning.

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.