← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1964575] Re: [DB] Migration to SQLAlchemy 2.0

 

Yes, I think we can close this one and consider it as released. So far
we didn't find any new error in the CI jobs. Any new bug can be tracked
in a new LP bug.

** Changed in: neutron
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1964575

Title:
  [DB] Migration to SQLAlchemy 2.0

Status in neutron:
  Fix Released

Bug description:
  This is a container for the efforts to be done in Neutron, neutron-lib
  and plugins projects to migrate to SQLAlchemy 2.0.

  There is currently a patch in neutron-lib to disable the session
  "__autocommit" flag, that will be optional in SQLAlchemy 1.4 and
  mandatory in SQLAlchemy 2.0 [1]. We have found problems with how the
  session transactions are now handled by SQLAlchemy.

  In Neutron there are many places where we make a database call running
  on an implicit transaction, that means we don't explicitly create a
  reader/writer context. With "autocommit=True", this transaction is
  discarded immediately; under non-autocommit sessions, the transaction
  created remains open. That is leading to database errors as seen in
  the tempest tests.

  In [2], as recommended by Mike Bayer (main maintainer and author of
  SQLAlchemy), we have enabled again the "autocommit" flag and create a
  log message to track when Neutron tries to execute a command with
  session with an inactive transaction.

  The goal of this bug is to move all Neutron database interactions to
  be SQLAlchemy 2.0 compliant.

  
  [1]https://review.opendev.org/c/openstack/neutron-lib/+/828738
  [2]https://review.opendev.org/c/openstack/neutron-lib/+/833103

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1964575/+subscriptions



References