← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1166794] Re: Project creation fails if the current user is added to it

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1166794

Title:
  Project creation fails if the current user is added to it

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  This is happening in a fresh Devstack deployment on Ubuntu 12.04 LTS.

  Steps to reproduce:
  1. Log in as admin
  2. Go to projects tab
  3. Create a new project; click in Users tab within the modal for the project creation and add the current user as a member of the new project.

  Actual behavior: An error notification pops (There was an error
  submitting the form. Please try again.) and after a refresh I get an
  unauthorized error for every menu in the dashboard.

  Expected behavior: create a new project and add current user to its
  users list with the selected role.

  ## Traceback ##

  Environment:
  Request Method: GET
  Request URL: http://127.0.0.1/admin/projects/

  Django Version: 1.4.5
  Python Version: 2.7.3
  Installed Applications:
  ['openstack_dashboard',
   'django.contrib.contenttypes',
   'django.contrib.auth',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.humanize',
   'compressor',
   'horizon',
   'openstack_dashboard.dashboards.project',
   'openstack_dashboard.dashboards.admin',
   'openstack_dashboard.dashboards.settings',
   'openstack_auth']
  Installed Middleware:
  ('django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'horizon.middleware.HorizonMiddleware',
   'django.middleware.doc.XViewMiddleware',
   'django.middleware.locale.LocaleMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware')

  
  Traceback:
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
    111.                         response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
    38.         return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
    86.                 return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
    54.             return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
    38.         return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
    48.             return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
    69.         return handler(request, *args, **kwargs)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in get
    155.         handled = self.construct_tables()
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in construct_tables
    146.             handled = self.handle_table(table)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in handle_table
    118.         data = self._get_data_dict()
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in _get_data_dict
    182.             self._data = {self.table_class._meta.name: self.get_data()}
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/projects/views.py" in get_data
    77.                               _("Unable to retrieve project list."))
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/admin/projects/views.py" in get_data
    74.             tenants = api.keystone.tenant_list(self.request, admin=True)
  File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/keystone.py" in tenant_list
    150.     return keystoneclient(request, admin=admin).tenants.list()
  File "/opt/stack/python-keystoneclient/keystoneclient/v2_0/tenants.py" in list
    116.         tenant_list = self._list("/tenants%s" % query, "tenants")
  File "/opt/stack/python-keystoneclient/keystoneclient/base.py" in _list
    67.             resp, body = self.api.get(url)
  File "/opt/stack/python-keystoneclient/keystoneclient/client.py" in get
    408.         return self._cs_request(url, 'GET', **kwargs)
  File "/opt/stack/python-keystoneclient/keystoneclient/client.py" in _cs_request
    404.                                   **kwargs)
  File "/opt/stack/python-keystoneclient/keystoneclient/client.py" in request
    366.             raise exceptions.from_response(resp, resp.text)

  Exception Type: Unauthorized at /admin/projects/
  Exception Value: Unable to communicate with identity service: {"error": {"message": "Could not find token: 0258edbd0b1378bfbc9f1c54d2830ae4", "code": 401, "title": "Not Authorized"}}. (HTTP 401)

  ##

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1166794/+subscriptions