Bug 1061137

Summary: Wrong exception raised when trying to create an existing tenant
Product: [Community] RDO Reporter: yfried
Component: openstack-keystoneAssignee: Jamie Lennox <jlennox>
Status: CLOSED CURRENTRELEASE QA Contact: Ami Jeain <ajeain>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: apevec, ayoung, nkinder, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1075246 (view as bug list) Environment:
Last Closed: 2014-05-07 15:38:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1061329    
Bug Blocks: 1075246    

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.