endless loop when deleting region

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

Bug Description

Reproduce:
1. create region A
2. create region B with parent A
3. update the parent of A to B
4. delete A or B

The error message:
{"error": {"message": "An unexpected error prevented the server from fulfilling your request: maximum recursion depth exceeded while getting the str of an object (Disable debug mode to suppress these details.)", "code": 500, "title": "Internal Server Error"}}

I have two solutions:
1. check circle when creating or updating region
2. do not allow the update of `parent_region_id`

I prefer the second one, it is simple enough. Any suggestion?

wanghong (w-wanghong)
Changed in keystone:
assignee: nobody → wanghong (w-wanghong)
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → High
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

I would vote for the first option and include a circular deletion check as well - basically if you hit the first region in the list you're deleting, break out and perform the deletions.

Changed in keystone:
status: New → Triaged
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/130445

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/130445
Reason: I made a mistake that use the same branch for two patches.

@Morgan Fainberg, I will give another patch soon.

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

Changed in keystone:
status: Triaged → In Progress
Dolph Mathews (dolph)
tags: added: juno-backport-potential
Changed in keystone:
milestone: none → kilo-1
Changed in keystone:
assignee: wanghong (w-wanghong) → Morgan Fainberg (mdrnstm)
Changed in keystone:
milestone: kilo-1 → kilo-2
Changed in keystone:
assignee: Morgan Fainberg (mdrnstm) → wanghong (w-wanghong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/130474
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=35a2834aecdde5fff9a930c38dae678a91c7fa67
Submitter: Jenkins
Branch: master

commit 35a2834aecdde5fff9a930c38dae678a91c7fa67
Author: wanghong <email address hidden>
Date: Wed Oct 22 17:53:00 2014 +0800

    add circular check when updating region

    Now, we can make a circle in hierarchical regions via updating region,
    this can lead to endless loop when deleting region.
    Add a check when updating region to ensure no circle in hierarchical
    regions. And, add a circular deletion check as well to delete already
    exist circular hierarchies.

    Change-Id: I8e020bf4a63cabf653be95f46d70e8f58439d78d
    Closes-Bug: #1383676

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-2 → 2015.1.0
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.