This is a brief followup to placement container playground, wherein I've been using sticking placement into a container with the smallest footprint as a way of exploring the issues involved with extracting placement from nova.
I have two series that experiment with changes that could reduce the footprint:
But it turns out that neither of these are enough when integrating them into the container.
A newly revealed challenge is that when importing
access the global
oslo_config) all the configuration is imported, leading to
lots of things needing to import their own requirements. So, for example,
Placement doesn't need that.
Then, importing the
db_api imports the
cells_rpcapi, which eventually
nova/objects/fields.py being imported, which wants
cells_rpcapi also imports the
network_model which eventually leads to
nova.utils, which wants
Placement doesn't need that either.
Placement only uses the
db_api module to create a context manager
that provides a database session. It's possible to isolate this code.
A WIP now exists to Isolate the placement database
With that in place we hit the next roadblock: The database
model/schema files are in the nova.db package and
there does this:
from nova.db.api import *. Which means the
cells_rpcapi stuff mentioned still gets imported. Argh!
It might be an option to move the model files into a different place.
nova/db/__init__.py would lead to changes in many other
files, but might be worth it as importing any code in
trigger the code in
There will probably be a -3 followup to this, with more steps forwards and more steps back.