Unable to update a region description to None

Bug #1398165 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Steve Martinelli

Bug Description

The region table doesn't allow for nullable descriptions [1] . The catalog Manager checks if region['description'] is set in the request and if the user hasn't provided a description for the region, the Manager will set it to an empty string [2]. If the user creates a region with a description and then later tries to update the description to be None, or an empty string, the request will fail because validation against the description field will fail.

 Invalid input for field 'description'. The value is 'None'.

The user should be able to pass None, or null in json, to Keystone in a region request. Region description are documented as being optional.

[1] https://github.com/openstack/keystone/blob/2d829b4d9a886909735daa0f8a9419c8ba8d3f87/keystone/common/validation/parameter_types.py#L40-L42
[2] https://github.com/openstack/keystone/blob/2d829b4d9a886909735daa0f8a9419c8ba8d3f87/keystone/catalog/core.py#L103-L106

Changed in keystone:
assignee: nobody → Lance Bragstad (lbragstad)
status: New → In Progress
Revision history for this message
Lance Bragstad (lbragstad) wrote :

@dstanek had a patch sitting in review for this that looks good, but I'm assigning to him since I didn't write the code :)

description: updated
Changed in keystone:
assignee: Lance Bragstad (lbragstad) → David Stanek (dstanek)
Revision history for this message
David Stanek (dstanek) wrote :

This is being addressed by https://review.openstack.org/#/c/117611/

Changed in keystone:
milestone: none → liberty-1
milestone: liberty-1 → kilo-rc1
Changed in keystone:
importance: Undecided → Low
milestone: kilo-rc1 → none
Changed in keystone:
assignee: David Stanek (dstanek) → Steve Martinelli (stevemar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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

commit c6e96e4cb2611502a8992c02f607a9da5ecfd1e9
Author: David Stanek <email address hidden>
Date: Thu Aug 28 20:28:48 2014 +0000

    region.description is optional and can be null

    region.description is documented to be optional and should be treated as
    optional.

    A null description provided when creating indicates that the user
    doesn't want a description stored. This is equivalent to not sending
    a description property at all.

    A null description provided when updating indicates that the user
    doesn't want a description stored and any existing description should be
    removed.

    In both cases we treat this as an empty string because our database
    schema requires a non-null value for description.

    Closes-Bug: #1398165
    Change-Id: I4a890414927ab5278861341b71a3e7fb324946a4

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