project delete returns 501 NotImplemented with templated catalog

Bug #1579604 reported by Sam Morrison
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Sam Morrison
Mitaka
Fix Released
High
Sam Morrison

Bug Description

Have upgraded to Mitaka and getting a 501 when deleting a project. This happens in both v2 and v3 api. The project actually deletes.

Am using stable/mitaka branch and the sql backend

$ keystone tenant-create --name deleteme

+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | |
| enabled | True |
| id | 5fafe2512fb3404ead999c30a23d0107 |
| name | deleteme |
+-------------+----------------------------------+

$ keystone tenant-delete 5fafe2512fb3404ead999c30a23d0107

The action you have requested has not been implemented. (HTTP 501) (Request-ID: req-7ad5ee51-539f-4780-a39a-0f4e9ad092dc)

$ keystone tenant-get 5fafe2512fb3404ead999c30a23d0107

No tenant with a name or ID of '5fafe2512fb3404ead999c30a23d0107' exists.

In logs:

2016-05-09 12:06:40.265 16723 WARNING keystone.common.wsgi [req-7ad5ee51-539f-4780-a39a-0f4e9ad092dc c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - default default] The action you have requested has not been implemented.
2016-05-09 12:06:40.269 16723 INFO eventlet.wsgi.server [req-7ad5ee51-539f-4780-a39a-0f4e9ad092dc c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - default default] 128.250.116.173 - - [09/May/2016 12:06:40] "DELETE /v2.0/tenants/5fafe2512fb3404ead999c30a23d0107 HTTP/1.1" 501 354 0.223312

Revision history for this message
Sam Morrison (sorrison) wrote :

I have tracked it down to a call in keystone/resource/core.py under the _post_delete_cleanup_project

The culprit is:

notifications.Audit.deleted(self._PROJECT, project_id, initiator)

Commenting out this line fixes it.

I haven't configured any notifications so maybe this is why the NotImplemented is thrown?

Revision history for this message
Vishal (vishaldhanopia) wrote :

Please confirm your complete environment, because I have no error in my environment.
Mine is: Mitaka packstack

Revision history for this message
Sam Morrison (sorrison) wrote :

I'm using the stable/mitaka branch from official openstack git repo.

HEAD is 582596c4408148796262442c2378a2338460c2fe

Installed using "pip install -e ."

Installed on Ubuntu 16.04

It's configured using the official puppet-keystone module and I have not configured any notifications or anything related to notification (eg. keystone doesn't talk to rabbit)

Let me know what else you need

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/336400

Changed in keystone:
assignee: nobody → Sam Morrison (sorrison)
status: New → In Progress
Revision history for this message
Sam Morrison (sorrison) wrote : Re: project delete returns 501 NotImplemented

I have debugged this further, the NotImplementedError and traced it though to

keystone/catalog/controllers.py(404)_on_project_or_endpoint_delete()

the call

self.catalog_api.delete_association_by_project(project_or_endpoint_id)

raise NotImplementedError:

This is because we are using the templated Catalog driver

summary: - project delete returns 501 NotImplemented
+ project delete returns 501 NotImplemented with templated catalog
Changed in keystone:
milestone: none → newton-2
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/336400
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=8232f4f23c1c33a6e45073386f40e79139d9b980
Submitter: Jenkins
Branch: master

commit 8232f4f23c1c33a6e45073386f40e79139d9b980
Author: Sam Morrison <email address hidden>
Date: Fri Jul 1 17:25:26 2016 +1000

    Handle catalog backends that don't support all functions.

    Using the templated backend for catalogs deleting a project
    will currently work but it will return an error to the user
    that is raised in the delete notification code handling.

    Change-Id: Ie2ecb226389a7ee74dc64b28b0e08817e6375801
    Closes-Bug: #1579604

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/337913

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

Reviewed: https://review.openstack.org/337913
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=ffe584da91d7bac2bf5651bb9efe4c0964661aa1
Submitter: Jenkins
Branch: stable/mitaka

commit ffe584da91d7bac2bf5651bb9efe4c0964661aa1
Author: Sam Morrison <email address hidden>
Date: Fri Jul 1 17:25:26 2016 +1000

    Handle catalog backends that don't support all functions.

    Using the templated backend for catalogs deleting a project
    will currently work but it will return an error to the user
    that is raised in the delete notification code handling.

    Change-Id: Ie2ecb226389a7ee74dc64b28b0e08817e6375801
    Closes-Bug: #1579604
    (cherry picked from commit 8232f4f23c1c33a6e45073386f40e79139d9b980)

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/keystone 10.0.0.0b2

This issue was fixed in the openstack/keystone 10.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 9.2.0

This issue was fixed in the openstack/keystone 9.2.0 release.

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

Mitaka is EOL

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.