User creation fails when using a duplicate email address

Bug #898799 reported by Paul Lappas on 2011-12-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
High
Gabriel Hurley

Bug Description

When I try and create a user with an Email address that is already used by another user in the system, the user creation fails with a nasty error.

Affected version: diablo

To reproduce:

1. Create a new tenant "tenant-1"

2. Create a user "user-1" with
  email address = <email address hidden>
  primary tenant = tenant-1

  RESULT = SUCCESS

3. Create a user "user-2" with
  email address = <email address hidden>
  primary tenant = tenant-1

  RESULT = SUCCESS

4. Create a user "user-3" with
  email address = <email address hidden>
  primary tenant = tenant-1

  RESULT = ERROR*

5. Create a user "user-3" with
  email address = <email address hidden>
  primary tenant = tenant-1

  RESULT = ERROR*

6. Create a user "user-3" with
  email address = <email address hidden>
  primary tenant = tenant-1

  RESULT = SUCCESS

* ---Exception---

KeyError at /syspanel/users/create

Environment:

Request Method: POST
Request URL: http://172.17.2.2/syspanel/users/create

Django Version: 1.3
Python Version: 2.6.7
Installed Applications:
['dashboard',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_openstack',
 'django_openstack.templatetags',
 'savage.dash',
 'mailer']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django_openstack.middleware.keystone.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'dashboard.middleware.DashboardLogUnhandledExceptionsMiddleware')

Traceback:
File "/usr/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.6/site-packages/Django-1.3-py2.6.egg/django/contrib/auth/decorators.py" in _wrapped_view
  23. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django_openstack/decorators.py" in dec
  37. return fn(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/django_openstack/syspanel/views/users.py" in create
  208. True)
File "/usr/lib/python2.6/site-packages/django_openstack/api.py" in user_create
  666. user_id, email, password, tenant_id, enabled))
File "/usr/lib/python2.6/site-packages/openstackx/extras/users.py" in create
  48. return self._create('/users', params, "user")
File "/usr/lib/python2.6/site-packages/openstackx/api/base.py" in _create
  41. return self.resource_class(self, body[response_key])

Exception Type: KeyError at /syspanel/users/create
Exception Value: 'user'

Paul Lappas (paullappas) on 2011-12-01
description: updated
Paul Lappas (paullappas) on 2011-12-01
description: updated
Gabriel Hurley (gabriel-hurley) wrote :

This was fixed in a previous commit post-diablo. The current behavior is a nice error alert informing you that a user with that email address already exists.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: New → Fix Committed
Devin Carlen (devcamcar) on 2011-12-09
Changed in horizon:
importance: Undecided → High
milestone: none → essex-2
Thierry Carrez (ttx) on 2011-12-14
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in horizon:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers