From: John Griffith Date: Thu, 13 Nov 2014 14:43:13 +0000 (-0700) Subject: Explicitly close requests obj in SolidFire Driver X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9a2156c3d5b67e551f29f214c75b9daee0d0035e;p=openstack-build%2Fcinder-build.git Explicitly close requests obj in SolidFire Driver Currently we're not explicitly returning requests connection objects back to the ConnectionPool when we're done with them. For most cases this isn't a problem, however if we start adding higher and higher concurrent actions the internal Connection Pool management doesn't keep up. This patch just adds an explicit close of the requests connection after we're done with it to keep the ConnectionPool as full as possible and avoid any resource issues that could occur during heavy concurrent usage. Change-Id: Ib074ca15286060d2aa11cdc66e74be1b8eed3c93 --- diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index be56afb7c..fe228133b 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -169,6 +169,7 @@ class SolidFireDriver(SanISCSIDriver): timeout=2) response = req.json() + req.close() if (('error' in response) and (response['error']['name'] in self.retryable_errors)): msg = ('Retryable error (%s) encountered during '