]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix incorrect invocation of _add_to_threadpool
authorIan Denhardt <ian@zenhack.net>
Thu, 26 Mar 2015 01:47:47 +0000 (21:47 -0400)
committerIan Denhardt <ian@zenhack.net>
Thu, 26 Mar 2015 17:32:54 +0000 (13:32 -0400)
commit748ddf3ec1caf1ad78cf58f3099618a62cb8eb56
tree0a3eb6fca991f4f874e2140dbc0aef388bfa471f
parentaf809cdab14a6357162f179aa3591507978e5170
Fix incorrect invocation of _add_to_threadpool

_add_to_threadpool expects to be passed the function and which is to be
run in an alternate thread, and the function's arguments. Instead, the
function (self.delete_volume) was being invoked directly, and it's
result passed to _add_to_threadpool. This results in a TypeError being
raised (the result is a bool, which is not callable), but more
importantly, it defeats the purpose of the statement - to offload the
invocation of delete_volume to another thread.

Change-Id: I524156cbffe0f6f5a2da902c6a62417d1ec425b9
Closes-Bug: #1436624
cinder/volume/manager.py