Bug 1061137 - Wrong exception raised when trying to create an existing tenant
Summary: Wrong exception raised when trying to create an existing tenant
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-keystone
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jamie Lennox
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On: 1061329
Blocks: 1075246
TreeView+ depends on / blocked
 
Reported: 2014-02-04 12:39 UTC by yfried
Modified: 2016-04-26 22:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1075246 (view as bug list)
Environment:
Last Closed: 2014-05-07 15:38:57 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Launchpad 1039552 None None None Never
Launchpad 1291047 None None None Never

Description yfried 2014-02-04 12:39:34 UTC
Description of problem:
Creating a tenant with an existing name raises None (400) instead of an actual Exception with 409 code.

Version-Release number of selected component (if applicable):
# rpm -qa | grep keystone
python-keystoneclient-0.4.1-3.el6.noarch
openstack-keystone-2014.1-0.3.b2.el6.noarch
python-keystone-2014.1-0.3.b2.el6.noarch

How reproducible:


Steps to Reproduce:
1. keystone tenant-create --name <existing name>

Actual results:
exceptions must be old-style classes or derived from BaseException, not NoneType (HTTP 400)

Expected results:
Conflict occurred attempting to store project. (IntegrityError) (1062, "Duplicate entry 'default-demo' for key 'domain_id'") 'INSERT INTO project (id, name, domain_id, description, enabled, extra) VALUES (%s, %s, %s, %s, %s, %s)' ('fa75b34060e44ba694052512f1f7a0f9', 'demo', 'default', None, 1, '{}') (HTTP 409)

Additional info:
maybe create a nicer looking message?

Comment 1 yfried 2014-02-04 12:48:47 UTC
added partially related upstream bug

Comment 2 Alan Pevec 2014-05-07 15:38:57 UTC
Upstream fix was included in Icehouse GA and RDO Icehouse was released.


Note You need to log in before you can comment on or make changes to this bug.