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
This commit is contained in:
Samuel Merritt 2015-11-12 11:34:44 -08:00
parent b9fd530657
commit caa127d59a
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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()