Error number should be used when throwing IOError exception

Bug #1718789 reported by Daniel Park
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Expired
Undecided
Unassigned

Bug Description

In some parts of the code, Keystone is raising an IOError with just a string. While this does work, it would be helpful to include an error number using the errno library.

https://github.com/openstack/keystone/blob/68f1043ce2a96e3d9a1e458c825800c061c95fe2/keystone/identity/backends/ldap/common.py#L595
https://github.com/openstack/keystone/blob/68f1043ce2a96e3d9a1e458c825800c061c95fe2/keystone/identity/backends/ldap/common.py#L607
https://github.com/openstack/keystone/blob/0d845e0316955eca5ed85b610d587d6667ea2bac/keystone/federation/idp.py#L496

This would also prevent a UnicodeError exception from being thrown in an environment that is using an older version of oslo.i18n (< 3.1.0).

Revision history for this message
Lance Bragstad (lbragstad) wrote :

Are any of these cases invoked by a `keystone-manage` command? Otherwise this would be done through the HTTP API.

Changed in keystone:
importance: Undecided → Low
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Hi Daniel,

In some of these cases, where do you expect the error number to be (logs, exception in the API response, etc)?

I see one of the places we use this exception is establishing connections with LDAP backends, which might be hit when starting keystone or on first authentication.

Changed in keystone:
importance: Low → Undecided
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Identity (keystone) because there has been no activity for 60 days.]

Changed in keystone:
status: Incomplete → Expired
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.