decoding error when delete role with windows 2012 ad identity backend

Bug #1359504 reported by Yaguang Tang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
In Progress
Medium
Yaguang Tang

Bug Description

yaguang@yaguang-ThinkPad-X230:~$ keystone --os-token beyond630 --os-endpoint http://localhost:35357/v2.0 role-delete 1c8551ebd5e341d7888fa2b31ce592eb
An unexpected error prevented the server from fulfilling your request: 'utf8' codec can't decode byte 0xfb in position 2: invalid start byte (Disable debug mode to suppress these details.) (HTTP 500)

2014-08-21 10:38:08.241 9132 DEBUG keystone.common.ldap.core [-] LDAP search: base=ou=Roles,dc=ubuntu,dc=com scope=2 filterstr=(&(cn=1c8551ebd5e341d7888fa2b31ce592eb)(objectclass=organizationalRole)) attrs=None attrsonly=0 search_s /home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py:911
2014-08-21 10:38:08.695 9132 DEBUG keystone.common.ldap.core [-] LDAP unbind unbind_s /home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py:884
2014-08-21 10:38:08.696 9132 DEBUG keystone.common.ldap.core [-] LDAP unbind unbind_s /home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py:884
2014-08-21 10:38:08.696 9132 ERROR keystone.common.wsgi [-] 'utf8' codec can't decode byte 0xfb in position 2: invalid start byte
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi Traceback (most recent call last):
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/wsgi.py", line 214, in __call__
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi result = method(context, **params)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/assignment/controllers.py", line 232, in delete_role
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi self.assignment_api.delete_role(role_id)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/notifications.py", line 75, in wrapper
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi result = f(*args, **kwargs)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/assignment/core.py", line 484, in delete_role
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi self.driver.delete_role(role_id)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/assignment/backends/ldap.py", line 227, in delete_role
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi return self.role.delete(role_id, self.project.tree_dn)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/assignment/backends/ldap.py", line 651, in delete
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi super(RoleApi, self).delete(role_id)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 1494, in delete
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi conn.delete_s(self._id_to_dn(object_id))
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 1264, in _id_to_dn
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi 'objclass': self.object_class})
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 926, in search_s
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi py_result = convert_ldap_result(ldap_result)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 154, in convert_ldap_result
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi for kind, values in six.iteritems(attrs))))
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 154, in <genexpr>
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi for kind, values in six.iteritems(attrs))))
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 123, in ldap2py
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi return utf8_decode(val)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/home/yaguang/working/openstack/keystone/keystone/common/ldap/core.py", line 84, in utf8_decode
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi return _utf8_decoder(value)[0]
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi return codecs.utf_8_decode(input, errors, True)
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi UnicodeDecodeError: 'utf8' codec can't decode byte 0xfb in position 2: invalid start byte
2014-08-21 10:38:08.696 9132 TRACE keystone.common.wsgi
2014-08-21 10:38:08.703 9132 INFO access [-] 127.0.0.1 - - [21/Aug/2014:02:38:08 +0000] "DELETE http://localhost:35357/v2.0/OS-KSADM/roles/1c8551ebd5e341d7888fa2b31ce592eb HTTP/1.0" 500 261
2014-08-21 10:38:08.704 9132 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [21/Aug/2014 10:38:08] "DELETE /v2.0/OS-KSADM/roles/1c8551ebd5e341d7888fa2b31ce592eb HTTP/1.1" 500 409 5.789012

Yaguang Tang (heut2008)
Changed in keystone:
assignee: nobody → Yaguang Tang (heut2008)
summary: - encoding error when delete role with windows 2012 ad identity backend
+ decoding error when delete role with windows 2012 ad identity backend
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/116231

Changed in keystone:
status: New → In Progress
Yaguang Tang (heut2008)
tags: added: icehouse-backport-potential
Dolph Mathews (dolph)
tags: added: ldap
Changed in keystone:
milestone: none → juno-rc1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Dolph Mathews (<email address hidden>) on branch: master
Review: https://review.openstack.org/116231
Reason: my apologies, we had 4 bugs with 4 fixes for the same issue (and I didn't realize this was related until this morning)... dropping this in favor of https://review.openstack.org/#/c/119457/ which is now gating

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.