nova/nova/tests
Dan Smith 2c0a306632 Limit parallel live migrations in progress
This patch extends the previous one[1] to allow limiting the total number of parallel
builds that nova-compute will attempt to cover live migrations. Since we can now
block immediately on the semaphore, this also implements the behavior we have in
build, which spawns a new thread for the process so that we don't starve our
RPC workers waiting on the semaphore. In reality, live migrations take a long time,
so this was something we should have already had.

Further, as soon as we receive the request to do the live migration, we mark the
migration object as status='queued' to indicate that it's waiting for its turn
on the compute node. Once we're given a slot to run, the normal status='preparing'
will be set. This will allow an operator to monitor the status of queued and
running migrations.

This includes a change to the libvirt driver to avoid spawning another thread
for the live migrations process. That makes it synchronous from the perspective
of compute manager, and in line with all the other drivers that support the
operation. Since compute manager now spawns the thread, libvirt is unaffected
and the other drivers avoid potentially starving the RPC worker pool as well.

[1] Commit 5a542e7706

DocImpact: Adds a new configuration variable to limit parallel live migrations.
           Zero means "unlimited" and nonzero means "this many in parallel".

Closes-Bug: #1478108
Change-Id: Ia8a796372746b7fc75485dc2e663f270dbd5893a
2015-08-13 07:06:56 -07:00
..
functional Move v2.1 code to the main compute directory - remove v3 step3 2015-08-13 09:58:47 +08:00
unit Limit parallel live migrations in progress 2015-08-13 07:06:56 -07:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fixtures.py Skip additionalProperties checks when LegacyV2CompatibleWrapper enabled 2015-08-06 14:38:45 +08:00