Removed tpool.execute to prevent upload failure

As of now there no solution to the issue where thread is getting
stuck in eventlet.
Few other similar incidents and without proper solution:
https://bugs.launchpad.net/cinder/+bug/1694509
https://github.com/eventlet/eventlet/issues/432
https://github.com/eventlet/eventlet/issues/492
https://github.com/eventlet/eventlet/issues/395

Change-Id: Ib278780ccb20b9cbef50f54ba1a1ad33761c8002
closes-bug: #1742729
This commit is contained in:
Kushal Agrawal 2018-10-24 19:10:07 +05:30
parent 63f663b760
commit 80c2ec1932
1 changed files with 3 additions and 5 deletions

View File

@ -15,7 +15,6 @@
from copy import deepcopy
from eventlet import tpool
import jsonpatch
from oslo_config import cfg
from oslo_log import log as logging
@ -604,12 +603,11 @@ class Engine(object):
if hasattr(af, 'validate_upload'):
LOG.warning("Method 'validate_upload' was deprecated. "
"Please use 'pre_upload_hook' instead.")
fd, path = tpool.execute(
af.validate_upload, context, af, field_name, fd)
fd, path = af.validate_upload(context, af, field_name, fd)
else:
LOG.debug("Initiating Pre_upload hook")
fd = tpool.execute(af.pre_upload_hook,
context, af, field_name, blob_key, fd)
fd = af.pre_upload_hook(context, af, field_name,
blob_key, fd)
LOG.debug("Pre_upload hook executed successfully")
except exception.GlareException:
raise