Live LDAP tests fail when trying to create user with an arbitrary attribute

Bug #1247142 reported by Elena Ezhova
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Unassigned

Bug Description

I ran _ldap_livetest and it failed with the following traceback:

FAIL: keystone.tests.test_ldap_livetest.LiveLDAPIdentity.test_arbitrary_attributes_are_returned_from_create_user
tags: worker-0
----------------------------------------------------------------------
Traceback (most recent call last):
  File "keystone/tests/test_backend.py", line 2646, in test_arbitrary_attributes_are_returned_from_create_user
    user = self.identity_api.create_user(user_data['id'], user_data)
  File "keystone/notifications.py", line 44, in wrapper
    result = f(*args, **kwargs)
  File "keystone/identity/core.py", line 179, in wrapper
    return f(self, *args, **kwargs)
  File "keystone/identity/core.py", line 324, in create_user
    ref = driver.create_user(user_id, user)
  File "keystone/identity/backends/ldap.py", line 95, in create_user
    user_ref = self.user.create(user)
  File "keystone/identity/backends/ldap.py", line 229, in create
    values = super(UserApi, self).create(values)
  File "keystone/common/ldap/core.py", line 738, in create
    ref = super(EnabledEmuMixIn, self).create(values)
  File "keystone/common/ldap/core.py", line 342, in create
    conn.add_s(self._id_to_dn(values['id']), attrs)
  File "keystone/common/ldap/core.py", line 565, in add_s
    return self.conn.add_s(dn, ldap_attrs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 194, in add_s
    return self.result(msgid,all=1,timeout=self.timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 422, in result
    res_type,res_data,res_msgid = self.result2(msgid,all,timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 426, in result2
    res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 432, in result3
    ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 96, in _ldap_call
    result = func(*args,**kwargs)

There are four tests in total which work with arbitrary attributes, but three of them are skipped in test_backend_ldap:

def test_arbitrary_attributes_are_returned_from_get_user(self):
    self.skipTest("Using arbitrary attributes doesn't work under LDAP")

def test_new_arbitrary_attributes_are_returned_from_update_user(self):
    self.skipTest("Using arbitrary attributes doesn't work under LDAP")

def test_updated_arbitrary_attributes_are_returned_from_update_user(self):
    self.skipTest("Using arbitrary attributes doesn't work under LDAP")

So I find it strange that test_arbitrary_attributes_are_returned_from_create_user is not skipped like these three.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/54932

Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Low
Changed in keystone:
status: New → Fix Released
Revision history for this message
Dolph Mathews (dolph) wrote :

The above fix has not been released yet.

Changed in keystone:
status: Fix Released → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.