Fix cinder-volume uses latest req-id for all log calls
Currently all log entries will have the request ID of the
latest request that was received in the cinder-volume service.
To fix this we just move the monkey patching to the top in the
imports.
Change-Id: Ic1ad7a38cf21256d9446fd2c0270610b4cfe75c5
Closes-Bug: #1773924
(cherry picked from commit 219961bff6
)
This commit is contained in:
parent
d64062e343
commit
e6d1fd1533
@ -17,16 +17,13 @@
|
||||
|
||||
"""Starter script for Cinder Volume."""
|
||||
|
||||
import logging as python_logging
|
||||
import os
|
||||
import re
|
||||
|
||||
import eventlet
|
||||
import eventlet.tpool
|
||||
import os
|
||||
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
|
||||
# Monkey patching must go before the oslo.log import, otherwise
|
||||
# oslo.context will not use greenthread thread local and all greenthreads
|
||||
# will share the same context.
|
||||
if os.name == 'nt':
|
||||
# eventlet monkey patching the os module causes subprocess.Popen to fail
|
||||
# on Windows when using pipes due to missing non-blocking IO support.
|
||||
@ -34,6 +31,13 @@ if os.name == 'nt':
|
||||
else:
|
||||
eventlet.monkey_patch()
|
||||
|
||||
import logging as python_logging
|
||||
import re
|
||||
|
||||
from cinder import exception
|
||||
from cinder import objects
|
||||
|
||||
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user