From: Jay S. Bryant Date: Fri, 20 Feb 2015 22:56:44 +0000 (-0600) Subject: Sync 'threadgroup' from oslo-incubator X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6be17cc7c12a2ff6bdc41eb97a6e3681009752ca;p=openstack-build%2Fcinder-build.git Sync 'threadgroup' from oslo-incubator The threadgroup module hasn't had a sync since September of 2014. The module needs to be updated to support the move to using the oslo_log library. This patch brings us up to the latest module level. Current HEAD in OSLO: --------------------- commit e589dde0721a0a67e4030813e582afec6e70d042 Date: Wed Feb 18 03:08:12 2015 +0000 Merge "Have a little fun with release notes" Changes merged with this patch: --------------------- 2fbf5065 - Remove oslo.log code and clean up versionutils API 1523f000 - threadgroup: don't log GreenletExit Change-Id: I5b7e281f6879f2749cd8b446c65e2fcb3abfbe95 --- diff --git a/cinder/openstack/common/threadgroup.py b/cinder/openstack/common/threadgroup.py index 12acf5df9..a2022a3c4 100644 --- a/cinder/openstack/common/threadgroup.py +++ b/cinder/openstack/common/threadgroup.py @@ -11,12 +11,12 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. +import logging import threading import eventlet from eventlet import greenpool -from cinder.openstack.common import log as logging from cinder.openstack.common import loopingcall @@ -96,6 +96,8 @@ class ThreadGroup(object): continue try: x.stop() + except eventlet.greenlet.GreenletExit: + pass except Exception as ex: LOG.exception(ex)