summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Allow testing of MySQL and PostgreSQL scenario locallyJulien Danjou2016-05-194-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* api: always enable retry_on_requestJulien Danjou2016-05-172-8/+8
| | | | | | | | | | | | | | 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
* Updated from global requirementsOpenStack Proposal Bot2016-05-101-1/+1
| | | | Change-Id: Ia9fc0a54e5c6b9d30be7e051026471f5b0048fd1
* Merge "Raise DbMigrationError for invalid version"Jenkins2016-05-102-1/+30
|\
| * Raise DbMigrationError for invalid versiondineshbhor2016-03-302-1/+30
| | | | | | | | | | | | | | | | | | 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
* | Merge "Remove unused sqlite_fk in _init_connection_args call"Jenkins2016-05-101-1/+0
|\ \
| * | Remove unused sqlite_fk in _init_connection_args callJulien Danjou2016-04-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Correct docstring"Jenkins2016-04-201-1/+1
|\ \ \
| * | | Correct docstringBrant Knudson2016-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The docstring was using the wrong parameter name. Change-Id: Icb1afbaba8cd618be2670845fe36fba66e1d042a
* | | | Merge "Fix unit tests failures, when psycopg2 is not installed"Jenkins2016-04-201-0/+17
|\ \ \ \
| * | | | Fix unit tests failures, when psycopg2 is not installedRoman Podoliaka2016-04-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Updated from global requirementsOpenStack Proposal Bot2016-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I9cefbe40d4406acb2a12aadce9fad28d036ad0de
* | | | | Merge "Remove direct dependency on babel"Jenkins2016-04-191-1/+0
|\ \ \ \ \
| * | | | | Remove direct dependency on babelJoshua Harlow2016-04-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dependency on oslo.i18n already forces this requirement. Change-Id: Id54e7d886c2358deb49e45ca8987e9502dc6c6d7
* | | | | | Imported Translations from ZanataOpenStack Proposal Bot2016-04-1916-98/+77
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Id3a12bacc1521966bca61a627536a847225ea903
* | | | | Add debtcollector to requirementsRoman Podoliaka2016-04-181-0/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Fix server_default comparison for BigInteger"Jenkins2016-04-162-1/+7
|\ \ \ \ | |_|/ / |/| | |
| * | | Fix server_default comparison for BigIntegerAnn Kamyshnikova2016-04-152-1/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Updated from global requirementsOpenStack Proposal Bot2016-04-131-1/+1
|/ / | | | | | | Change-Id: Id429419fda2dcfb98b27d997877dbc42ac87a4e0
* | Updated from global requirementsOpenStack Proposal Bot2016-04-081-1/+1
| | | | | | | | Change-Id: I590e44bffd711b810792855123aacdc85e864184
* | Updated from global requirementsOpenStack Proposal Bot2016-04-081-1/+1
| | | | | | | | Change-Id: Iddbae4f4df0089cb6776c2602af60a94cd7bdbdf
* | Updated from global requirementsOpenStack Proposal Bot2016-04-072-2/+2
| | | | | | | | Change-Id: I221b36a6480e7c9c5f65c0c904e95d830e8a6f6e
* | Updated from global requirementsOpenStack Proposal Bot2016-04-061-1/+1
| | | | | | | | Change-Id: Id7d7009ea014a70adcdfad2d0456c1a930dcb26b
* | Updated from global requirementsOpenStack Proposal Bot2016-04-021-1/+1
|/ | | | Change-Id: I63e2dcda0126d07f45ed7ba68258949376e59c81
* Merge "Remove sqlalchemy < 1.0.0 compatible layer"Jenkins2016-03-246-575/+4
|\
| * Remove sqlalchemy < 1.0.0 compatible layerChangBo Guo(gcb)2016-03-146-575/+4
| | | | | | | | | | | | | | We bump sqlalchemy >=1.0.10, so don't need compatible layer in master branch now. Change-Id: Ib3974669893d2f7b059eab38468f127ee2c790af
* | Merge "Add new filter for DBDataError exception"Jenkins2016-03-232-0/+38
|\ \
| * | Add new filter for DBDataError exceptionbhagyashris2016-03-222-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix spelling mistakedineshbhor2016-03-221-1/+1
|/ / | | | | | | | | | | TrivialFix Change-Id: I2750a01ef0f65f067edf1fdad378c97dd5bcd018
* | Let enginefacade._TransactionContextManager look for contextAndrew Laski2016-03-182-1/+20
|/ | | | | | | | | | 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
* Update reno for stable/mitakaDoug Hellmann2016-03-092-0/+7
| | | | Change-Id: I4a468ee3584bc442a37b0b584e7451dd11bd3dc1
* Merge "Add tests for float interval values in wrap_db_retry()"Jenkins2016-03-021-5/+26
|\
| * Add tests for float interval values in wrap_db_retry()Julian Sy2016-02-251-5/+26
| | | | | | | | | | | | | | | | | | | | 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
* | Updated from global requirementsOpenStack Proposal Bot2016-02-261-1/+1
| | | | | | | | Change-Id: If0bf6b0621bca07c25b25105af3a324c80149ddb
* | Merge "Increase the default max_overflow value"4.6.0Jenkins2016-02-242-0/+26
|\ \ | |/ |/|
| * Increase the default max_overflow valueRoman Podoliaka2016-02-242-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Clarify the types for retry_interval args of wrap_db_retry"Jenkins2016-02-241-3/+4
|\ \ | |/ |/|
| * Clarify the types for retry_interval args of wrap_db_retryHenry Gessau2016-02-181-3/+4
| | | | | | | | | | | | | | | | | | 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
* | Updated from global requirementsOpenStack Proposal Bot2016-02-241-1/+1
| | | | | | | | Change-Id: I76462ae49dc4d102c24430a9382150001ee01cbb
* | add reno for release notes managementDoug Hellmann2016-02-239-0/+304
| | | | | | | | | | Change-Id: I6574d2bb21fa8c64290b06ab493f8f7c8b1b7c16 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* | Updated from global requirementsOpenStack Proposal Bot2016-02-201-1/+1
| | | | | | | | Change-Id: I122380ae921422083529f892ae28eb628ff802fc
* | Updated from global requirementsOpenStack Proposal Bot2016-02-191-1/+1
|/ | | | Change-Id: Ic7047825c790913cc988c9a6739ab882dba6d568
* Merge "stop making a copy of options discovered by config generator"4.5.0Jenkins2016-02-121-3/+1
|\
| * stop making a copy of options discovered by config generatorDoug Hellmann2016-02-101-3/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Updated from global requirementsOpenStack Proposal Bot2016-02-111-1/+1
|/ | | | Change-Id: Icb8474b007085b0b803fd1413026fa3dd8f68d34
* exceptions: provide .message attribute for Py3K compatibility4.4.0Roman Podoliaka2016-02-082-0/+21
| | | | | | | | | | | | | | | | | 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
* Updated from global requirementsOpenStack Proposal Bot2016-02-081-1/+1
| | | | Change-Id: I1103fed62ae10b1b53f4478022c9ac7e28799695
* InvalidSortKey constructor change breaks Heat unittestsDavanum Srinivas2016-02-062-1/+3
| | | | | | | | Just supply a default value None, to avoid breaking projects who currently use this exception. Closes-Bug: #1542671 Change-Id: Ia397cab309aa22a2a86964f2ff90a796c878b2e7
* Merge "exception: fix DBInvalidUnicodeParameter error message"Jenkins2016-02-052-2/+8
|\
| * exception: fix DBInvalidUnicodeParameter error messageJulien Danjou2016-02-042-2/+8
| | | | | | | | Change-Id: I1455f55929aa3a6037138770d407d247397c062b