[SRU] PooledLDAPHandler.result3 does not release pool connection back when an exception is raised
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Undecided
|
Mustafa Kemal Gilor | ||
Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
Antelope |
Fix Committed
|
Undecided
|
Unassigned | ||
Ussuri |
Triaged
|
Undecided
|
Unassigned | ||
Victoria |
Fix Committed
|
Undecided
|
Unassigned | ||
Wallaby |
Fix Committed
|
Undecided
|
Unassigned | ||
Xena |
Fix Committed
|
Undecided
|
Unassigned | ||
Yoga |
Fix Committed
|
Undecided
|
Unassigned | ||
Zed |
Fix Committed
|
Undecided
|
Unassigned | ||
keystone (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Triaged
|
Undecided
|
Unassigned | ||
Jammy |
Fix Committed
|
Undecided
|
Unassigned | ||
Lunar |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
[Impact]
This SRU is a backport of https:/
This SRU intends to fix a denial-of-service bug that happens when keystone uses pooled ldap connections. In pooled ldap connection mode, keystone borrows a connection from the pool, do the LDAP operation and release it back to the pool. But, if an exception or error happens while the LDAP connection is still borrowed, Keystone fails to release the connection back to the pool, hogging it forever. If this happens for all the pooled connections, the connection pool will be exhausted and Keystone will no longer be able to perform LDAP operations.
The fix corrects this behavior by allowing the connection to release back to the pool even if an exception/error happens during the LDAP operation.
[Test Case]
- Deploy an LDAP server of your choice
- Fill it with many data so the search takes more than `pool_connectio
- Define a keystone domain with the LDAP driver with following options:
[ldap]
use_pool = True
page_size = 100
pool_connection
pool_retry_max = 3
pool_size = 10
- Point the domain to the LDAP server
- Try to login to the OpenStack dashboard, or try to do anything that uses the LDAP user
- Observe the /var/log/
To confirm the fix, repeat the scenario and observe that the "/var/log/
[Regression Potential]
The patch is quite trivial and should not affect any deployment in a negative way. The LDAP pool functionality can be disabled by setting "use_pool=False" in case of any regression.
summary: |
PooledLDAPHandler.result3 does not release pool connection back when an - exception raises + exception is raised |
Changed in keystone: | |
assignee: | nobody → Mustafa Kemal Gilor (mustafakemalgilor) |
Changed in keystone (Ubuntu Lunar): | |
status: | New → Fix Released |
Fix proposed to branch: master /review. opendev. org/c/openstack /keystone/ +/866723
Review: https:/