keystoneauth/releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml
Alex Schultz b2b5ad3cb1 Cleanup session on delete
If an external session object was not passed to the Session class, we
create a requests.Session() on our own. Once this is used, it may still
have an open connection when the auth Session is closed. We need to
handle the closing of the requests.Session() ourselves if we created
one. If you do not close it, a ResourceWarning may be reported about the
socket that is left open. If a session object is provided, we do not
attempt to close it as it will be up to the code consuming keystoneauth
to properly handle cleaning up the provided session.

Change-Id: I590755d665b371c76ba8e02836d81d41a95ac601
Closes-Bug: #1838704
2019-08-26 08:12:27 -06:00

10 lines
410 B
YAML

---
fixes:
- >
[`bug 1838704 <https://bugs.launchpad.net/keystone/+bug/1838704>`_]
When consuming keystoneauth1.session.Session, if a requests session is not
provided one is created. The Session used for requests may result in a
ResourceWarning being generated if it is not properly closed. The code
has been updated to close the session correctly when the Session object
is deleted.