| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This leverage pifpaf to start MySQL or PostgreSQL temporarily and allow to test
provisioning directly without being on OpenStack CI by adding new tox
targets:
- py27-mysql
- py27-postgresql
- py34-mysql
- py34-postgresql
- py27-all
- py34-all
These targets will start MySQL or PostgreSQL before running the tests,
while exporting the connection string to $PIFPAF_URL. The `all' target
will start both MySQL and PostgreSQL and will run the tests against
these backends, plus SQLite.
Also, this patches add OS_TEST_DBAPI_ADMIN_CONNECTION to be allowed to
be passed through tox. This allows to run the opportunistic tests on a
more persistent pifpaf database, for example by running tox with:
$ eval `pifpaf -g OS_TEST_DBAPI_ADMIN_CONNECTION run postgresql`
$ echo $OS_TEST_DBAPI_ADMIN_CONNECTION
postgresql://localhost/postgres?host=/var/folders/7k/pwdhb_mj2cv4zyr0kyrlzjx40000gq/T/tmpMGqN8C&port=9824
$ tox -e py27
[…]
$ tox -e py34
[…]
$ kill $PIFPAF_PID
Change-Id: I1ee582e6f96e98378f02be79f4aaff0f447a062a
Depends-On: Id3e6b694bb186724517599cd9875ad80ceeee053
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current behavior makes by default retry_on_request does not work,
which is confusing. Nothing except the developer can raise a
RetryRequest, so there can not be any misunderstanding. Having to both
enable the switch *and* raise RetryRequest makes it more complicated
than it needs to be.
This patch simplifies the API by deprecating retry_on_request and
retry_on_request() decorator, enabling the exception everywhere
wrap_db_retry() is used.
Change-Id: I3c53b5c8ba99f460153256fb2e1e6ef01b67f41b
|
|
|
|
| |
Change-Id: Ia9fc0a54e5c6b9d30be7e051026471f5b0048fd1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Caught InvalidVersionError and DatabaseAlreadyControlledError
and raised oslo_db specific DbMigrationError exception if given
invalid version as a argument to db_version_control() method.
Related-Bug: #1546441
Change-Id: Ic2c3ab5bd83c206a14d9bacf4b477198c06a55f5
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This keyword argument has been moved to be consumed by the SQLite
version of the _init_events() call, and is no longer consumed by an
_init_connection_args() hook.
Change-Id: I5d477cde90fc0c20e0f6c5bc29af34d635502f68
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The docstring was using the wrong parameter name.
Change-Id: Icb1afbaba8cd618be2670845fe36fba66e1d042a
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A few TestConnectionUtils test cases currently fail, when psycopg2 is
not installed, while they do not necessarily need to have the latter.
Mock parts of psycopg2 dialect in SQLAlchemy to make sure psycopg2
module is not imported in tests.
Closes-Bug: #1499216
Change-Id: I92c14f0e29a57e6e3ff4a8a8a1c25bbd16848d9a
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I9cefbe40d4406acb2a12aadce9fad28d036ad0de
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The dependency on oslo.i18n already forces this requirement.
Change-Id: Id54e7d886c2358deb49e45ca8987e9502dc6c6d7
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: Id3a12bacc1521966bca61a627536a847225ea903
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
debtcollector is used by oslo.db at runtime, but is not currently
mentioned in requirements.txt explicitly (which effectively means
it's installed as a transitive dependency now).
This fixes tox -epip-missing-reqs run. A follow up change to
project-config will make sure we run this check in the gate.
Closes-Bug: #1571739
Change-Id: I564030830708da5c8a18f0c8a127ae74d54ead39
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is needed to add manual check for server_default parameter for
BigInteger as it is already done for Integer.
Closes-bug: #1569262
Change-Id: I91b5b3516a6ea0674bc31f3d5a91505fcd927b8b
|
|/ /
| |
| |
| | |
Change-Id: Id429419fda2dcfb98b27d997877dbc42ac87a4e0
|
| |
| |
| |
| | |
Change-Id: I590e44bffd711b810792855123aacdc85e864184
|
| |
| |
| |
| | |
Change-Id: Iddbae4f4df0089cb6776c2602af60a94cd7bdbdf
|
| |
| |
| |
| | |
Change-Id: I221b36a6480e7c9c5f65c0c904e95d830e8a6f6e
|
| |
| |
| |
| | |
Change-Id: Id7d7009ea014a70adcdfad2d0456c1a930dcb26b
|
|/
|
|
| |
Change-Id: I63e2dcda0126d07f45ed7ba68258949376e59c81
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
We bump sqlalchemy >=1.0.10, so don't need compatible layer
in master branch now.
Change-Id: Ib3974669893d2f7b059eab38468f127ee2c790af
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For sqlite database if insert or update command fails
due to unicode value then it raises DBError whereas
for mysql using filter it raises DBDataError.
To maintain consistency, added new filter which will
raise DBDataError for sqlite database as well.
Related-Bug: #1393871
Related-Bug: #1531400
Change-Id: Ibb61a69b1b0c6ce6172f290848f44f89e2b41d3b
|
|/ /
| |
| |
| |
| |
| | |
TrivialFix
Change-Id: I2750a01ef0f65f067edf1fdad378c97dd5bcd018
|
|/
|
|
|
|
|
|
|
|
| |
The previous behavior was to assume that a RequestContext was the first
argument of the wrapped method. This has meant creating staticmethods
within classes in order to be wrapped properly. It's not always
desirable to do so and should not be necessary.
Change-Id: I76b0d9c80dd7841c1333f8b8a2ccdd15e55dfcff
Closes-bug: 1520195
|
|
|
|
| |
Change-Id: I4a468ee3584bc442a37b0b584e7451dd11bd3dc1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added unit test for wrap_db_retry that used a float for retry_interval
Added mocking of time.sleep() and checking the calls on retry_interval
related tests
Closes Bug: #1549241
Change-Id: Ic7eeb5654aca263aee6e84ab591e061e2ccc6c86
|
| |
| |
| |
| | |
Change-Id: If0bf6b0621bca07c25b25105af3a324c80149ddb
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It turned out that distribution of WSGI requests between forks is not
even when eventlet is used, which can cause pool timeout issues under
load, while there are idle workers with open DB connections, which
should have served these HTTP requests.
The default max_overflow value should be increased to allow DB oriented
services (mostly APIs) handle spikes in number of concurrent requests
trying to use a DB.
At the same time, the default number of greenlets is decreased:
I65b40b9906b75146a0085bbe168f1e6bcae82f21
which effectively causes a particular worker to stop accepting new
requests it has no resources (DB connections) to handle and allow
other forks accept()'ing on the same FD to proceed.
Testing was performed using this script:
https://gist.github.com/zzzeek/c69138fd0d0b3e553a1f
With 100 greenthreads in the pool, 50 DB connections allowed overflow
no pool timeout issues were seen with up to 500 concurrent requests
done by ab, while current default values (1000/10) could not handle
even 100 concurrent requests.
See this ML thread for details:
http://lists.openstack.org/pipermail/openstack-dev/2015-December/082717.html
DocImpact
This change potentially increases the number of connections open to the
RDBMS server. If you start seeing "too many connections" errors, please
check these settings and adjust them appropriately:
https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_connections
http://www.postgresql.org/docs/current/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS
Closes-Bug: #1535375
Change-Id: I2e9c2a71d8231e0dfbefc6293ad319e1e459beec
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The retry_interval and max_retry_interval can be floats, and
inc_retry_interval is a bool.
This change has no functional impact.
Change-Id: I752c1dd7fe7e2a479b06ab96ad85be4e4a6f5b45
|
| |
| |
| |
| | |
Change-Id: I76462ae49dc4d102c24430a9382150001ee01cbb
|
| |
| |
| |
| |
| | |
Change-Id: I6574d2bb21fa8c64290b06ab493f8f7c8b1b7c16
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
|
| |
| |
| |
| | |
Change-Id: I122380ae921422083529f892ae28eb628ff802fc
|
|/
|
|
| |
Change-Id: Ic7047825c790913cc988c9a6739ab882dba6d568
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order for the config generator's new hook for updating default values
to work, we have to return the same Opt objects from list_opts() that
our set_defaults() function is going to modify. There's no real need to
be making copies of the objects anyway, so just stop doing it.
Change-Id: I62c2f733f1e7943449aa744ed15dac4addb3e1f7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
|
|/
|
|
| |
Change-Id: Icb8474b007085b0b803fd1413026fa3dd8f68d34
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In two recent commits we fixed the way .message class attribute was
used by passing it as an argument to __init__() of the base Exception
class instead.
Unfortunately, this currently breaks Heat unit tests on Py3K as
exception instances no longer provide .message attribute there.
Re-introduce .message properties only for exception classes that used
to have them to ensure the new oslo.db release do not change the
interface of exceptions.
Closes-Bug: #1542961
Change-Id: I5cae408555956d77e6cbb4e5e513c1c6c375d29d
|
|
|
|
| |
Change-Id: I1103fed62ae10b1b53f4478022c9ac7e28799695
|
|
|
|
|
|
|
|
| |
Just supply a default value None, to avoid breaking projects
who currently use this exception.
Closes-Bug: #1542671
Change-Id: Ia397cab309aa22a2a86964f2ff90a796c878b2e7
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I1455f55929aa3a6037138770d407d247397c062b
|