commit ef9fd9fca05f8da8325ccaa6632e34d1321130bf
Author: Stuart McLaren <email address hidden>
Date: Tue Feb 17 17:36:56 2015 +0000
https: Prevent leaking sockets for some operations
Other OpenStack services which instantiate a 'https' glanceclient using
ssl_compression=False and insecure=False (eg Nova, Cinder) are leaking
sockets due to glanceclient not closing the connection to the Glance
server.
This could happen for a sub-set of calls, eg 'show', 'delete', 'update'.
netstat -nopd would show the sockets would hang around forever:
... 127.0.0.1:9292 ESTABLISHED 9552/python off (0.00/0/0)
urllib's ConnectionPool relies on the garbage collector to tear down
sockets which are no longer in use. The 'verify_callback' function used to
validate SSL certs was holding a reference to the VerifiedHTTPSConnection
instance which prevented the sockets being torn down.
Reviewed: https:/ /review. openstack. org/156975 /git.openstack. org/cgit/ openstack/ python- glanceclient/ commit/ ?id=ef9fd9fca05 f8da8325ccaa663 2e34d1321130bf
Committed: https:/
Submitter: Jenkins
Branch: master
commit ef9fd9fca05f8da 8325ccaa6632e34 d1321130bf
Author: Stuart McLaren <email address hidden>
Date: Tue Feb 17 17:36:56 2015 +0000
https: Prevent leaking sockets for some operations
Other OpenStack services which instantiate a 'https' glanceclient using compression= False and insecure=False (eg Nova, Cinder) are leaking
ssl_
sockets due to glanceclient not closing the connection to the Glance
server.
This could happen for a sub-set of calls, eg 'show', 'delete', 'update'.
netstat -nopd would show the sockets would hang around forever:
... 127.0.0.1:9292 ESTABLISHED 9552/python off (0.00/0/0)
urllib's ConnectionPool relies on the garbage collector to tear down nnection
sockets which are no longer in use. The 'verify_callback' function used to
validate SSL certs was holding a reference to the VerifiedHTTPSCo
instance which prevented the sockets being torn down.
Change-Id: Idb3e68151c48ed 623ab89d05d88ea 48465429838
Closes-bug: 1423165