← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1521772] Fix merged to keystone (master)

 

Reviewed:  https://review.openstack.org/264779
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=545987e1c4d451832b2d6c069874a11ae0bc6347
Submitter: Jenkins
Branch:    master

commit 545987e1c4d451832b2d6c069874a11ae0bc6347
Author: Ankit Agrawal <ankit11.agrawal@xxxxxxxxxxx>
Date:   Thu Jan 7 05:29:06 2016 -0800

    Expose defect in users_in_group, groups_for_user exact filters
    
    List users in a group by name and list groups for user by name throws
    HTTP 500 error in case of exact filters because filter_by query used
    in case of exact filter is not able to filter using 'name' attribute.
    This patch exposes this issue by adding new unit test cases to ensure
    list_users_in_group and list_groups_for_user APIs are called with
    exact filters.
    
    Partial-Bug: 1521772
    Change-Id: I5d3c2041551a020341a98554ebb885888ec3cc9d


** Changed in: keystone
       Status: In Progress => Fix Released

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

Title:
  List users in a group by name throws  HTTP 500 error

Status in OpenStack Identity (keystone):
  Fix Released
Status in OpenStack Identity (keystone) liberty series:
  New

Bug description:
  (keystone.common.wsgi): 2015-12-01 21:53:58,603 INFO wsgi __call__ GET http://192.168.245.9:35357/v3/groups/42b6bb3bb70f487cbf9633bf55eb9ddc/users?name=admin
  (keystone.common.wsgi): 2015-12-01 21:53:58,610 ERROR wsgi __call__ Entity '<class 'keystone.identity.backends.sql.UserGroupMembership'>' has no property 'name'
  Traceback (most recent call last):
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/common/wsgi.py", line 248, in __call__
      result = method(context, **params)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/common/controller.py", line 207, in wrapper
      return f(self, context, filters, **kwargs)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/identity/controllers.py", line 233, in list_users_in_group
      refs = self.identity_api.list_users_in_group(group_id, hints=hints)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/common/manager.py", line 58, in wrapper
      return f(self, *args, **kwargs)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/identity/core.py", line 433, in wrapper
      return f(self, *args, **kwargs)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/identity/core.py", line 444, in wrapper
      return f(self, *args, **kwargs)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/identity/core.py", line 1123, in list_users_in_group
      ref_list = driver.list_users_in_group(entity_id, hints)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/identity/backends/sql.py", line 226, in list_users_in_group
      query = sql.filter_limit_query(User, query, hints)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/common/sql/core.py", line 410, in filter_limit_query
      query = _filter(model, query, hints)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/keystone/common/sql/core.py", line 362, in _filter
      query = query.filter_by(**filter_dict)
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 1345, in filter_by
      for key, value in kwargs.items()]
    File "/opt/stack/service/keystone/venv/lib/python2.7/site-packages/sqlalchemy/orm/base.py", line 383, in _entity_descriptor
      (description, key)
  InvalidRequestError: Entity '<class 'keystone.identity.backends.sql.UserGroupMembership'>' has no property 'name'

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


References