commit f9be9467a30aaa0540867e2818e81b5b024af527
Author: Dan Smith <email address hidden>
Date: Thu Oct 23 10:10:48 2014 -0700
Run build_and_run_instance in a separate greenthread
If we're doing a lot of build operations, we are using a large portion
of the limited rpc worker pool for long periods of time. Since we may wait
on external services (like neutron or glance) during those times, we could
fully deplete that pool.
This patch makes us spawn a new greenthread for that task and return the
rpc worker to the pool. Due to some funkiness with the stack of decorators,
this breaks the inner function out to an object method, which is probably
good anyway, given its size. This also moves the wrap_instance_event
decorator to the inner function so that the start and stop events properly
demarcate the actual task and not just the (now very quick) RPC call.
Change-Id: Ife712c43c5a61424bc68b2f5ab47cefdb46ac168
Closes-Bug: #1372049
(cherry picked from commit 1d8eddb2614de8daaddddd64ad1a8de4c215fe7a)
Reviewed: https:/ /review. openstack. org/132202 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f9be9467a30 aaa0540867e2818 e81b5b024af527
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit f9be9467a30aaa0 540867e2818e81b 5b024af527
Author: Dan Smith <email address hidden>
Date: Thu Oct 23 10:10:48 2014 -0700
Run build_and_ run_instance in a separate greenthread
If we're doing a lot of build operations, we are using a large portion
of the limited rpc worker pool for long periods of time. Since we may wait
on external services (like neutron or glance) during those times, we could
fully deplete that pool.
This patch makes us spawn a new greenthread for that task and return the
rpc worker to the pool. Due to some funkiness with the stack of decorators,
this breaks the inner function out to an object method, which is probably
good anyway, given its size. This also moves the wrap_instance_event
decorator to the inner function so that the start and stop events properly
demarcate the actual task and not just the (now very quick) RPC call.
Change-Id: Ife712c43c5a614 24bc68b2f5ab47c efdb46ac168 aaddddd64ad1a8d e4c215fe7a)
Closes-Bug: #1372049
(cherry picked from commit 1d8eddb2614de8d