Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1075246

Summary: Wrong exception raised when trying to create an existing tenant
Product: Red Hat OpenStack Reporter: Nathan Kinder <nkinder>
Component: openstack-keystoneAssignee: RHOS Maint <rhos-maint>
Status: CLOSED NEXTRELEASE QA Contact: Ami Jeain <ajeain>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 7)CC: apevec, ayoung, yeylon, yfried
Target Milestone: rc   
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1061137 Environment:
Last Closed: 2014-05-07 15:48:31 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: 1061137    
Bug Blocks:    

Description Nathan Kinder 2014-03-11 20:53:35 UTC
+++ This bug was initially created as a clone of Bug #1061137 +++

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?

--- Additional comment from  on 2014-02-04 07:48:47 EST ---

added partially related upstream bug

Comment 2 Alan Pevec 2014-05-07 15:48:31 UTC
Fixed upstream in Icehouse GA.