From dffb94d80cf33fa0bb37159bf4cb5fcb952f3807 Mon Sep 17 00:00:00 2001 From: Shachar Snapiri Date: Mon, 22 Jan 2018 16:10:52 +0200 Subject: [PATCH] Added call to monkey_patch to all cli apps All our eventlets and cli apps should call the eventlet_utils.monkey_patch() It is now in all tests and eventlets, but missing from the cli apps. This will also prevent the issue in bug #1744558. Currently the issue does not exist in the cli apps because they exit very quickly, but if they will be delayed and the subscriber mechanism will finish its initialization, they will get stuck too. The problem resides in the urllib3 HTTPResponse code that is used by the etcd3gw library. The client is stuck waiting for data on a socket and is not closed even when we call the close() method. Change-Id: I37889dcb232f3c1557f241f82ade41520eb2de4e Co-Authored-By: Omer Anson Closes-Bug: #1744558 --- dragonflow/cli/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dragonflow/cli/__init__.py b/dragonflow/cli/__init__.py index e69de29bb..01f9f6933 100644 --- a/dragonflow/cli/__init__.py +++ b/dragonflow/cli/__init__.py @@ -0,0 +1,15 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from neutron.common import eventlet_utils + +eventlet_utils.monkey_patch()