Using latest Essex.
$keystone tenant-create --name=demo
$keystone tenant-create --name=demo
root@cc1:/opt/devstack/devstack/files# keystone tenant-create --name=demo
No handlers could be found for logger "keystoneclient.client"
Unable to communicate with identity service: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, in __call__
return app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/opt/keystone/keystone/common/wsgi.py", line 284, in __call__
response = request.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/opt/keystone/keystone/common/wsgi.py", line 284, in __call__
response = request.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/opt/keystone/keystone/common/wsgi.py", line 284, in __call__
response = request.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/opt/keystone/keystone/common/wsgi.py", line 284, in __call__
response = request.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/opt/keystone/keystone/common/wsgi.py", line 307, in __call__
resp = req.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1053, in get_response
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/request.py", line 1022, in call_application
app_iter = application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
response = self.app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 159, in __call__
return resp(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 147, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg/webob/dec.py", line 208, in call_func
return self.func(req, *args, **kwargs)
File "/opt/keystone/keystone/common/wsgi.py", line 181, in __call__
result = method(context, **params)
File "/opt/keystone/keystone/identity/core.py", line 303, in create_tenant
context, tenant_id, tenant_ref)
File "/opt/keystone/keystone/common/manager.py", line 48, in _wrapper
return f(*args, **kw)
File "/opt/keystone/keystone/identity/backends/sql.py", line 319, in create_tenant
session.flush()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush
self._flush(objects)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush
flush_context.execute()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute
rec.execute(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute
uow
File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj
execute(statement, multiparams)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute
params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute
cursor.execute(statement, parameters)
IntegrityError: (IntegrityError) column name is not unique u'INSERT INTO tenant (id, name, extra) VALUES (?, ?, ?)' ('cfabb987dba6434dbdfecb2e75d86876', u'demo', '{"enabled": true, "description": null}')
. (HTTP 500)
This is improved a tiny bit by the proposed patch for bug 955411:
$ keystone tenant-create --name=asdf .client" bc8afbf6310032d cac6', u'asdf', '{"enabled": true, "description": null}') (HTTP 500)
No handlers could be found for logger "keystoneclient
An unexpected error prevented the server from fulfilling your request. (IntegrityError) column name is not unique u'INSERT INTO tenant (id, name, extra) VALUES (?, ?, ?)' ('b4f30dc979c74
However, IntegrityErrors should be expected and return 409 Conflict instead of 500.