diff options
author | Andrew Laski <andrew@lascii.com> | 2015-12-09 11:54:26 -0500 |
---|---|---|
committer | Andrew Laski <andrew@lascii.com> | 2016-01-28 06:27:51 -0500 |
commit | 8e8e839ef748be242fd0ad02e3ae233cc98da8b2 (patch) | |
tree | 332bd68a790052c61ecc66ac8dcfb10a9c648dc0 /nova/test.py | |
parent | 9998c51f8808928eb0ae2f2c15c5348d030532ab (diff) | |
download | nova-8e8e839ef748be242fd0ad02e3ae233cc98da8b2.tar.gz |
Persist the request spec during an instance boot
The request spec that is used for scheduling the instance should be
persisted early in the boot process.
This is to support cellsv2 where the instance is not going to be created
in the db until scheduling has occurred. The persisted request spec is
one of the pieces needed to respond to api list/show requests for
unscheduled instances.
The persisted request spec will also be used by
resize/migration/live-migrate operations to ensure that the instance is
scheduled to a host that fulfills the same constraints as the current
host.
Because there are a lot of tests that execute the boot path and are
backed by a database a new fixture was added to test.TestCase to
instantiate the api db if USE_DB is true. With this change the api db
will be more frequently needed.
NB: The request spec will not be persisted within a v1 cell and
therefore not be available for later resize/migration operations when
using cellsv1.
Finally, a releasenote is being added explaining that the nova_api
database needs to be setup at this point. RequestSpec.create() is the
first piece of code, outside of nova-manage commands, that uses the api
database.
Partially-implements: bp cells-scheduling-interaction
Change-Id: Idd4bbbe8eea68b9e538fa1567efd304e9115a02a
Diffstat (limited to 'nova/test.py')
-rw-r--r-- | nova/test.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/test.py b/nova/test.py index cffaed044e..0ae4f55754 100644 --- a/nova/test.py +++ b/nova/test.py @@ -210,6 +210,7 @@ class TestCase(testtools.TestCase): if self.USES_DB: self.useFixture(nova_fixtures.Database()) + self.useFixture(nova_fixtures.Database(database='api')) # NOTE(blk-u): WarningsFixture must be after the Database fixture # because sqlalchemy-migrate messes with the warnings filters. |