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

Originally was taken from: https://review.openstack.org/#/c/613023/1


Change-Id: Ic924f0ef0cb632b2439dfb7d1092bebf54adb863
closes-bug: #1742729
This commit is contained in:
idanaroz 2019-03-10 09:23:37 +00:00 committed by Idan Narotzki
parent 5297ea86e8
commit 7112503f67
1 changed files with 4 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
@ -591,11 +590,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:
fd = tpool.execute(af.pre_upload_hook,
context, af, field_name, blob_key, fd)
LOG.debug("Initiating Pre_upload hook")
fd = af.pre_upload_hook(context, af, field_name,
blob_key, fd)
except exception.GlareException:
raise
except Exception as e: