From caa127d59a63a25cc6d08e985e536f90300a6156 Mon Sep 17 00:00:00 2001 From: Samuel Merritt Date: Thu, 12 Nov 2015 11:34:44 -0800 Subject: [PATCH] Monkeypatch everything the same There's three spots in the code where eventlet monkeypatches things. In one place, it was monkeypatching socket and thread; in the other two, only socket. This commit monkeypatches socket and thread everywhere. Hopefully, this lets us avoid code that, for example, works in the object server but fails in the object updater. Change-Id: Ia30d069c5ac89f4bfbe52233d03d96738144b614 --- swift/container/updater.py | 4 ++-- swift/obj/updater.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swift/container/updater.py b/swift/container/updater.py index 3d79db2032..4703a5a04e 100644 --- a/swift/container/updater.py +++ b/swift/container/updater.py @@ -143,7 +143,7 @@ class ContainerUpdater(Daemon): pid2filename[pid] = tmpfilename else: signal.signal(signal.SIGTERM, signal.SIG_DFL) - patcher.monkey_patch(all=False, socket=True) + patcher.monkey_patch(all=False, socket=True, thread=True) self.no_changes = 0 self.successes = 0 self.failures = 0 @@ -177,7 +177,7 @@ class ContainerUpdater(Daemon): """ Run the updater once. """ - patcher.monkey_patch(all=False, socket=True) + patcher.monkey_patch(all=False, socket=True, thread=True) self.logger.info(_('Begin container update single threaded sweep')) begin = time.time() self.no_changes = 0 diff --git a/swift/obj/updater.py b/swift/obj/updater.py index e84ddfd466..87c21c397f 100644 --- a/swift/obj/updater.py +++ b/swift/obj/updater.py @@ -94,7 +94,7 @@ class ObjectUpdater(Daemon): pids.append(pid) else: signal.signal(signal.SIGTERM, signal.SIG_DFL) - patcher.monkey_patch(all=False, socket=True) + patcher.monkey_patch(all=False, socket=True, thread=True) self.successes = 0 self.failures = 0 forkbegin = time.time()