Back in February I wrote up a review of the issues involved with extracting placement from nova. Many of the tasks associated with that have been addressed but there's definitely plenty left to do so I'm writing up a second version.
Most code which is within nova.api.openstack.placement now
imports only from third parties or from itself, and not from other
parts of nova. Remaining issues in non-test code include:
-
Translation infrastructure via
from nova.i18n import _. This is straightforward to address but only worth doing once a new repository exists. -
Database model classes and constants via
from nova.db.sqlalchemy import api_models as modelsandfrom nova.db import constants as db_const.It's already possible to configure a database specific for placement, using the
[placement_database]configuration group, but doing so makes use of the nova-api database models and migrations. In an extracted placement this will require some significant adjustments, especially since not all the tables are used.More discussion and planning is certainly required here.
-
Service/application configuration is managed by
from nova import confandfrom nova.common import config. Placement will need its own configuration file and option setup. The placement playground series made it clear there's a relatively small set of configuration options that are required and slightly larger set that are available.
Similar issues are present in unit and functional tests:
-
UUID management with
from nova.tests import uuidsentinel. We can copy that small file into a placement repo or maybe it deserves to be inoslosomewhere. -
Unit tests for policy files make use of
conf_fixtureandpolicy_fixtureandnova.utilsfor temp directory handling. -
Some functional tests are based on
nova.testand use fixtures defined by the nova testing system, notably theDatabase,StandardLogging,OutputStreamCapturefixtures. Dealing with this will require duplicating some of the fixtures, but hopefully can be more lightweight. -
Some tests import
nova.context. This can be fixed now; placement already has its own context.
There's some work in progress to use an external library for
resource classes. This
addresses the from nova import rc_fields and from nova.db.sqlalchemy
import resource_class_cache as rc_cache imports.
And finally: documentation. Placement documentation is in three different places in the nova repo:
placement-api-refreleasenotesdoc/source
Within doc/source there are some files dedicated to placement, but
there are also many files where placement information is integrated.
There will of course be plenty of things that are forgotten. This is okay. When problems are found, we'll fix them. Bugs are the grist of a healthy contribution ecosystem.