This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I452ed203c74dc83ca328116d6111a05cf7342c53
The scenario where an existing database connection that's
present in the pool is found to be not connected to the
database should normally not be occurring; the idle_timeout
setting (aka pool_recycle) should be less than the effective "idle timeout"
set up on the server and/or HAProxy such that a stale
connection in the pool should already have been recycled.
As a system with a mis-configured idle_timeout can experience
latency due to this error hook, it should be reported that
this is an avoidable situation which is occurring. Right
now there's no easy way to see if a performance test is
spending lots of time hitting this condition or not.
Change-Id: I3e9613cbb982c727762247201c5c4972e21da725
The connection.info dictionary comes from the underlying
pooled connection, which in a disconnection situation
is not there; trying to access it makes it try to reconnect.
Inside of rollback(), SQLAlchemy doesn't allow us to
reconnect yet because we haven't finished removing the
transctional state that corresponds to the now-discarded
connection. Therefore we have to check connection.invalidated
inside of our rollback handlers before trying to add/remove tokens
from connection.info.
Change-Id: Icd10ada68d6d53410ac88eca3577f04c5e30087e
Resolves-bug: #1704474
https://review.openstack.org/427970 broke compatibility with
SQLAlchemy versions <1.1.0 by using sqlalchemy.dialects.mysql.types
in test_ndb.py.
Change-Id: I773e0931d4f9f345f8095559eff2eb35e0730027
Enables new functionality for selecting InnoDB or MySQL Cluster
as a DB storage backend in OpenStack services.
Closes-Bug: 1564110
Change-Id: I9f1fd2a87fdf75332de2339d3ff4f08ce9220dcf
Following OpenStack Style Guidelines:
[1] https://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more specific
assertions. As a result, assertIsNone(xxx) is preferred over
assertEqual(None, xxx) and assertIs(xxx, None)
Change-Id: Id0e54ddeb461e56fbc8ec3a4bbc8a581f11430df
All the exceptions which are raised from sqlalchemy-migrate upgrade
method are not more user friendly to the operator.
This patch proposes to convert all the exceptions which will be
raised by 'upgrade' method to an oslo_db specific 'DbMigrationError'
exception.
Related-Bug: #1546441
Change-Id: I28533bedba358281ce302b9b021744387a76c04a
Older installations may still be running with
URLs of the form "mysql://user:pass@host/dbname",
which defaults to the native MySQL driver that is not supported
by eventlet. Warn that URLs should be qualified with an explicit
driver, and in the case of MySQL that PyMySQL should be used.
Change-Id: Ie973a43c8d056778d02703cf75bfc52a90027dea
Maybe we need to know the original exception when exception occurs on
method 'session.rollback()'.
Change-Id: Iccda37a3279d6f24de69cfccef3e29787f1ac694
Closes-Bug: #1684329
Attaching a reference to the context to the session/connection
is useful for SQLAlchemy event handlers that only get access to
the session and need access to the context for additional details.
The use case driving this is the related bug where we want to pass
conditional update constraints set in the context via the HTTP API
down into an SQLAlchemy event listener.
Related-Bug: #1493714
Change-Id: I5c08e672782344e8778187e257e03c1a1d1b019a
We deprecated config options sqlite_db in July, 2016 [1], and
it shows up in many projects' config files but these projects
don't use it either, so it's confusing to our users. It's time
to remove it, just use config option connection or slave_connection
to connect to the database.
[1] https://review.openstack.org/#/c/338047/
Closes-Bug: #1329086
Change-Id: Id269d921e40edf95eb977b011f1753f633b79d18
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Change-Id: Id2d358ffdca998066b41c8178aac81d170f82d3c
Partial-Bug: #1668848
When converting existing session context manager code to
use enginefacade, normally a flush() is implicit on
a "subtransaction" when it closes. Enginefacade
has not maintained this behavior. Ideally, this should
have been on by default when enginefacade was first
released, but for now add this as a behavioral
option for projects that require it.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes-Bug: #1664643
Change-Id: I6f4f439928588cff954e749dfa938425892e0931