[openstack-dev] [Neutron] Getting rid of lazy init for engine facade

Roman Podoliaka rpodolyaka at mirantis.com
Wed May 11 13:58:14 UTC 2016

Hi Anna,

Thank you for working on this in Neutron!

EngineFacade is initialized lazily internally - you don't have to do
anything for that in Neutron (you *had to* with "old" EngineFacade -
this is the boiler plate your patch removes).

I believe, you should be able to call configure(...) unconditionally
as soon as you have parsed the config files. Why do you want to
introduce a new conditional?

Moreover, if you only have connections to one database (unlike Nova,
which also has Cells databases), you don't need to call configure() at
all - EngineFacade will read the values of config options registered
by oslo.db on the first attempt to get a session / connection.


On Wed, May 11, 2016 at 4:41 PM, Anna Kamyshnikova
<akamyshnikova at mirantis.com> wrote:
> Hi guys!
> I'm working on adoption of new engine facade from oslo.db for Neutron [1].
> This work requires us to get rid of lazy init for engine facade. [2] I
> propose change [3] that adds configure_db parameter which is False by
> default, so if work with db will be required configure_db=True should be
> passed manually.
> NOTE: this will affect all external repos depending on Neutron!
> I'm considering making this argument mandatory to force every project
> depending on this function explicitly make a decision there.
> I want to encourage reviewers to take a look at this change and l'm looking
> forward all suggestions.
> [1] - https://bugs.launchpad.net/neutron/+bug/1520719
> [2] -
> http://specs.openstack.org/openstack/oslo-specs/specs/kilo/make-enginefacade-a-facade.html
> [3] - https://review.openstack.org/#/c/312393/
> --
> Regards,
> Ann Kamyshnikova
> Mirantis, Inc
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

More information about the OpenStack-dev mailing list