Duplicate delete the user_project_metadata filter with project_id

Bug #1248037 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
huangtianhua

Bug Description

When assignment backend is sql,duplicate delete the user_project_metadata filter with project_id.
As follows:
@sql.handle_conflicts(type='project')
    def delete_project(self, tenant_id):
        session = self.get_session()

        with session.begin():
            tenant_ref = self._get_project(session, tenant_id)

            q = session.query(UserProjectGrant)
            q = q.filter_by(project_id=tenant_id)
            q.delete(False)

            q = session.query(UserProjectGrant)
            q = q.filter_by(project_id=tenant_id)
            q.delete(False)

No need to delete the data duplicate.

Changed in keystone:
assignee: nobody → huangtianhua (huangtianhua)
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/55216

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/55216
Committed: http://github.com/openstack/keystone/commit/caaf0ae407b32b6d491ff5e84413cc1b87a901c1
Submitter: Jenkins
Branch: master

commit caaf0ae407b32b6d491ff5e84413cc1b87a901c1
Author: huangtianhua <email address hidden>
Date: Tue Nov 5 14:19:00 2013 +0800

    Duplicate delete the user_project_metadata.

    When assignment backend is sql,duplicate delete the user_project_metadata
    filter with project_id when delete project.No need to do this.

    This patch fix the bug.

    Change-Id: Ic90798737b3f7f4418ce6ffbf1d9c945449798ca
    Closes-Bug: #1248037

Changed in keystone:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-1 → 2014.1
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.