get endpoints associated with a project will return 404 error if endpoint isnot exist

Bug #1305537 reported by wanghong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
wanghong

Bug Description

This is a bug about OS-EP-FILTER extension.

First, I let an endpoint associated with a project via command:
curl -i -H "X-Auth-Token:admin" http://127.0.0.1:35357/v3/OS-EP-FILTER/projects/baafa1ac3d1340a59b6f2500f3071c24/endpoints/bf14cf0a1bec4304945f5025e3a74f6f -X PUT

Then, I delete the endpoint. When I list all the endpoints associated with the project I get a 404 error response:
{"error": {"message": "Could not find endpoint, bf14cf0a1bec4304945f5025e3a74f6f.", "code": 404, "title": "Not Found"}}

Also, if I let an endpoint associated with a project, and then delete the project. I get the 404 response too when I get projects associated with the endpoint.

Revision history for this message
wanghong (w-wanghong) wrote :

I think here we can use revocation events to register the project and endpoint delete event and then delete the association in the callback.

Changed in keystone:
assignee: nobody → wanghong (w-wanghong)
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/87551

Changed in keystone:
status: New → In Progress
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by wanghong (<email address hidden>) on branch: master
Review: https://review.openstack.org/87551
Reason: Use https://review.openstack.org/#/c/109507/ instead.

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

Reviewed: https://review.openstack.org/109507
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=7674deac865f769e904e9100c6923f57a8a49b76
Submitter: Jenkins
Branch: master

commit 7674deac865f769e904e9100c6923f57a8a49b76
Author: wanghong <email address hidden>
Date: Fri Jul 25 14:48:49 2014 +0800

    Clean up EP-Filter after delete project/endpoint

    For endpoint_filter extension we should remove all the endpoint
    to project associations when we delete the associated endpoint
    or project. Otherwise list_endpoints_for_project and
    list_projects_for_endpoint API will return 404 response if the
    associated endpoint or project has been deleted. Also, there will
    be a lot of dirty data remaining in the database.

    Change-Id: I48e9100a8fa92d10b7ffe5f89bfb8ba9cf78a0e7
    Closes-Bug: #1305537

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: juno-3 → 2014.2
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.