Creating a region using V3 api fails in backend code when missing description

Bug #1284972 reported by Lance Bragstad
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Lance Bragstad

Bug Description

When creating a region using the V3 API, the request fails out in the backend code. This check should be handled in the controller/manager like it does for other resources (federation does this - https://github.com/openstack/keystone/blob/master/keystone/contrib/federation/controllers.py#L43-L44)

We could use the same functionality provided in https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L607 to fix this:

http://paste.openstack.org/show/69690/

description: updated
Changed in keystone:
assignee: nobody → shihanzhang (shihanzhang)
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/76444

Changed in keystone:
assignee: shihanzhang (shihanzhang) → Lance Bragstad (ldbragst)
status: New → In Progress
Revision history for this message
Lance Bragstad (lbragstad) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/78658

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/79159

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

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

commit f4f25f64c622dbe6eb8f1e386430091a87b26fb2
Author: Lance Bragstad <email address hidden>
Date: Sat Mar 8 15:23:08 2014 +0000

    Fixup region description uniqueness

    Add a db migration for relaxing the uniqueness constraint on the
    'description' column in the region table.

    The migration will only occur if there is a unique index constraint
    on the 'description' table. The previous migration of 037 has
    had the unique index dropped on table creation. 043 will only be
    run in the case of a deployment tracking closer to master than
    the official releases.

    Related-Bug: 1284972
    Change-Id: I8198aec2fea4ff6a88938696499a60ebc0b16a47

Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → High
milestone: none → icehouse-rc1
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-rc1 → 2014.1
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Reviewed: https://review.openstack.org/78658
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=42b823a44767f5dd613e717b3ac119787189c397
Submitter: Jenkins
Branch: master

commit 42b823a44767f5dd613e717b3ac119787189c397
Author: Lance Bragstad <email address hidden>
Date: Thu Mar 6 16:19:09 2014 +0000

    Allow 'description' in V3 Regions to be optional

    Currently, description is required for POST requests to regions when
    using the SQL backend. According to the Identity V3 API spec,
    description is not required. If a user creates a region without
    specifying a description for the region in the request, we can make sure
    it is sent to the database as an empty string.

    Change-Id: Ia6fb1a2eee6b471c0c44a66590f53d061bcd8643
    Related-Bug: 1284972

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

Change abandoned by Lance Bragstad (<email address hidden>) on branch: master
Review: https://review.openstack.org/76444
Reason: This is being addressed using jsonschema here:

https://review.openstack.org/#/c/96266/

Revision history for this message
David Stanek (dstanek) wrote :

There are two related problems:

  - when the user passes a null value for description when creating
  - when the user passes a null value for description when updating

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.