summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updated from global requirements1.7.3OpenStack Proposal Bot2015-09-171-1/+1
| | | | Change-Id: I64ecf19fa0097ff1939e99b26cd8eb414b550a22
* Updated from global requirementsOpenStack Proposal Bot2015-09-011-1/+1
| | | | Change-Id: I6240c01f0e344965e1e0664c7de9d4d015f91c4f
* Updated from global requirementsOpenStack Proposal Bot2015-08-281-1/+1
| | | | Change-Id: Idab1d9edc5ba8dcca65f688957acd7c6e294e6b0
* Updated from global requirementsOpenStack Proposal Bot2015-08-111-1/+1
| | | | Change-Id: Ib854799c9042cd6442a0e17f67671f8532f26370
* Merge "Add mock to test-requirements.txt" into stable/kiloJenkins2015-07-241-0/+1
|\
| * Add mock to test-requirements.txtRoman Podoliaka2015-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | Mention mock explicitly rather than relying on it to be installed as a transitive dependency, so that we have control on the mock versions allowed. Closes-Bug: #1476665 (cherry-picked from a21111d97151ca8d84c3bf4dd779374bfb0c83ed) Change-Id: Id734c3d7b7ef1ab8d97a13edb1de006c029c22a0
* | Updated from global requirementsOpenStack Proposal Bot2015-07-234-24/+23
|/ | | | Change-Id: Icaf116a2eafad4ce34a26879d4f19b66cac62506
* Merge "Avoid excessing logging of RetryRequest exception" into stable/kilo1.7.2Jenkins2015-05-151-1/+5
|\
| * Avoid excessing logging of RetryRequest exceptionEugene Nikanorov2015-03-301-1/+5
| | | | | | | | | | | | | | | | | | | | Such exception indicates of error condition only if retries are exceeded. In other cases error-level logs pollute the log file and complicate log analysis. Change-Id: I318867043a68a6499851631593859a0fffac6038 Closes-Bug: #1433001 (cherry picked from commit 02aeda28cf8b69f39f934a3e80cb7cae04c5fc20)
* | Updated from global requirementsOpenStack Proposal Bot2015-04-153-10/+10
|/ | | | Change-Id: I82eda050e801cf84b7438c79f59079a096429c17
* Add process guards + invalidate to the connection pool1.7.1Mike Bayer2015-03-162-0/+61
| | | | | | | | | | | | | | | | | It's not safe for a database TCP connection to be shared to a child process, as this is a file descriptor which will maintain its state on both sides. Applications such as Cinder which spin up multiprocessing subprocesses at startup time are subject to race conditions as a result. Instead of requiring that engines be explicitly prepared within a child process, we can detect and accommodate this situation in the connection pool itself, by tracking the originating pid of a connection, and if it changes on checkout, by invalidating. Change-Id: If116f7b7140b3eba064d8147e5f637a05beb1cd8 (cherry picked from commit ebbf23d6490159f0c8f4f35a08fb4b80371cd080)
* Switch to non-namespaced module import - oslo_i18n1.7.0Davanum Srinivas2015-03-121-2/+2
| | | | | | | Looks like we missed one! Closes-Bug: #1431268 Change-Id: I125c7fb66967b83e786c2f697d7bda68d361cb30
* Merge "Fix documented env variable for test connection"Jenkins2015-03-101-1/+1
|\
| * Fix documented env variable for test connectionAngus Salkeld2015-03-101-1/+1
| | | | | | | | | | | | | | I had to go digging into how this worked to figure out the missing "_ADMIN_". Change-Id: Id9a48cf413eacd04473f3413421681b32cbf5f29
* | Updated from global requirementsOpenStack Proposal Bot2015-03-072-2/+2
|/ | | | Change-Id: I577fec9512ca2a94418f37ea955cf590aea1c6d5
* Updated from global requirements1.6.0OpenStack Proposal Bot2015-03-051-2/+2
| | | | Change-Id: I9f799c931804d0695fd64b238ad0a6c5dbbb6cf1
* Merge "Use PyMySQL as DB driver in py3 environment"Jenkins2015-03-042-3/+7
|\
| * Use PyMySQL as DB driver in py3 environmentVictor Sergeyev2015-02-122-3/+7
| | | | | | | | | | | | | | | | | | MySQLDb driver works only with python2.x, so we should use an another connector for work with python3. Used OS_TEST_DBAPI_ADMIN_CONNECTION env variable to set connection strings. Change-Id: I27fbe8f87c713b53a0b1831543a23f7c06fe454b
* | Make DBAPI class work with mocks correctly1.5.0Roman Podoliaka2015-02-252-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, DBAPI __getattr__() implementation will *always* implicitly wrap all mocked methods of a target class/module using wrap_db_retry(), as retry_on_* attributes will always exist and be true for mock instances. Not only this leads to a situation, when we would retry methods, we were not going to retry, but this also fails with AttributeError on functools.wraps() call, breaking valid unit tests in projects. DBAPI is changed in a way, so that it does dict look ups instead of fetching instance attributes to ensure mocked methods are handled correctly and aren't wrapped when they shouldn't be wrapped. Related issue: http://stackoverflow.com/questions/22204660/python-mock-wrapsf-problems Change-Id: I36550ffa88056c53a431d64e61e84fbb44bbf68d
* | Updated from global requirementsOpenStack Proposal Bot2015-02-201-1/+1
| | | | | | | | Change-Id: Ie0a3c19e005fab985b1d6abaf1ac785471fffd8e
* | Imported Translations from TransifexOpenStack Proposal Bot2015-02-181-9/+9
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: If2388281d6e9cf3c76cee2293636aab8873818f6
* | Fix PyMySQL reference error detectionGregory Haynes2015-02-121-1/+1
|/ | | | | | | | When PyMySQL experiences a constraing error a unicode string prefix is prepended part way through the inner_exception string. As a result, we raise a DBError when we should be raising a DBReferenceError. Change-Id: I5de1333d933bd28ca535852f4643df2ebbc7f964
* Merge "Organize provisioning to use testresources"Jenkins2015-02-1212-155/+491
|\
| * Organize provisioning to use testresourcesMike Bayer2015-02-0412-155/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces the use of the testresources package, such that the provisioning system uses TestResourceManager objects in order to create and drop databases, schemas, and manage transactional testing. A new series of objects to support transparent transaction containers within tests is added as well. partially implement bp: long-lived-transactionalized-db-fixtures Partial-Bug: #1339206 Change-Id: I16bfa3af0e1ad6a9231ea38dea7cd76092347f55
* | Updated from global requirementsOpenStack Proposal Bot2015-02-093-3/+3
| | | | | | | | Change-Id: I5430adda717798e4ec31edbeab4e9aa72e5f80fa
* | Merge "Fix PatchStacktraceTest for pypy"Jenkins2015-02-051-1/+3
|\ \
| * | Fix PatchStacktraceTest for pypyOleksii Chuprykov2015-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | test_trace test cannot pass with mocked do_execute on pypy environment. Allow test to call do_execute with correct sql query. Change-Id: I165fc4de9f4a7f10cb45e92301652224e63f113b
* | | Merge "Refactor database migration manager to use given engine"Jenkins2015-02-045-31/+92
|\ \ \ | |_|/ |/| |
| * | Refactor database migration manager to use given engineVictor Sergeyev2015-01-275-31/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing global engine object introduces some changes to migration api. Basically we need to move engine creation to outer scope. In order to address these issues we need to refactor alembic api. Co-Authored-By: Dmitry Shulyak <dshulyak@mirantis.com> Adopted from Ia2f9586c4e9c31339dd7dcd9f45a58e8a8409921 Change-Id: Ic7dcf1d2f38388bd1e5a517ce60190bff499686a
* | | Merge "Implement backend-specific drop_all_objects for provisioning."Jenkins2015-02-035-26/+169
|\ \ \
| * | | Implement backend-specific drop_all_objects for provisioning.Mike Bayer2015-01-295-26/+169
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the drop_all_objects() portion of the testresources series of changes, so that this utility is usable right now. In particular, as SQLAlchemy 1.0 will support reflection of foreign key names in SQLite, it's necessary that we don't emit a DROP CONSTRAINT for these against SQLite as SQLite does not support this command. The drop_all_objects() is added as a first class element here and is also added to the _cleanup() method of the test_migrations base. Tests are added which exercise the case of mutually-dependent foreign keys on Postgresql and MySQL as well. partially implement bp: long-lived-transactionalized-db-fixtures Partial-Bug: #1339206 Change-Id: I56777834187651f5ba2e43482546c2981524b11c
* | | Merge "Add retry decorator allowing to retry DB operations on request"Jenkins2015-01-304-4/+75
|\ \ \
| * | | Add retry decorator allowing to retry DB operations on requestEugene Nikanorov2015-01-304-4/+75
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Improve retrying decorator such that wrapped code could request retry attempt in the arbitrary conditions by raising RetryRequest exception. Wrapped code should provide inner exception that is raised when amount of retries are exceeded. Change-Id: I596fea8dc798a11fcdfdd69208af3313f41d755b
* | | Imported Translations from TransifexOpenStack Proposal Bot2015-01-303-38/+38
|/ / | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I7e41fa70f5ec315f477e72beac2a705f04c1f710
* | Merge "Retry query if db deadlock error is received"Jenkins2015-01-273-42/+168
|\ \
| * | Retry query if db deadlock error is receivedrossella2015-01-143-42/+168
| |/ | | | | | | | | | | | | | | | | Add a decorator retry_on_deadlock(). All db.api functions marked with this decorator will be retried if a DBDeadlock exception is received. Change-Id: I3488bfec67ec1c563292f1b61a7a9697f118809c Closes-bug: 1348588
* | Merge "Updated from global requirements"Jenkins2015-01-263-3/+3
|\ \
| * | Updated from global requirementsOpenStack Proposal Bot2015-01-243-3/+3
| | | | | | | | | | | | Change-Id: I797f4532e39a700e70a2834ac299663118c608cc
* | | Merge "Fix 0 version handling in migration_cli manager"Jenkins2015-01-262-1/+6
|\ \ \ | |/ / |/| |
| * | Fix 0 version handling in migration_cli managerBoris Bobrov2015-01-262-1/+6
| |/ | | | | | | | | Change-Id: Ieabcf541bd5f2e6706159efe9d6ac54c7376004c Closes-Bug: 1413277
* | Update Oslo imports to remove namespace packageDoug Hellmann2015-01-2110-12/+12
|/ | | | | Change-Id: I4ec9b2a310471e4e07867073e9577731ac34027d Blueprint: drop-namespace-packages
* Merge "Ensure DBConnectionError is raised on failed revalidate"Jenkins2015-01-135-135/+379
|\
| * Ensure DBConnectionError is raised on failed revalidateMike Bayer2015-01-125-135/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second call to connection.scalar() inside of _connect_ping_listener() is not subject to the exc_filters system under SQLAlchemy 0.9 and earlier, in the case that the attempt to revalidate within fails. This causes the exception to be propagated outwards as the original OperationalError (assuming that's what the DBAPI raised, as is typical), rather than it being wrapped again in DBConnectionError. SQLAlchemy 1.0 has altered this behavior such that the handle_error() listener is invoked correctly for revalidiation attempts (it was being invoked before, but without the correct state), as well as for initial connect attempts, as part of https://bitbucket.org/zzzeek/sqlalchemy/issue/3266/. For 0.9 and earlier, we here backport this system into oslo/db/sqlalchemy/compat.py, including that we redefine the connection pool's handler to re-throw the original dbapi.Error instance directly, then move the handling of this error in terms of SQLAlchemy wrapping and events into the Engine and Connection. The approach here works back to SQLAlchemy 0.8, and is conditional based on whether or not SQLAlchemy 1.0 is detected. Change-Id: I455e957b043318a8500909c66cadde53228b52d6
* | Restore the check_foreign_keys() method.1.4.1Mike Bayer2015-01-122-0/+259
|/ | | | | | | | | | | | This method was prematurely removed from oslo.db without a deprecation phase, when Alembic added support for foreign key autodetection. oslo.db continues to use alembic for this purpose, however the ModelsMigrationsSync.check_foreign_keys() method is restored directly for those projects which were calling into it explicitly. Change-Id: Id892567bd60d6b4b88765bbfe3cd5c5e75910b25
* Merge "Fix slowest test output after test run"1.4.0Jenkins2015-01-121-2/+7
|\
| * Fix slowest test output after test runMatthew Treinish2015-01-111-2/+7
| | | | | | | | | | | | | | This commit fixes the output from pretty_tox.sh so that the testr slowest output is gobbled up by the pipe into subunit-trace. Change-Id: I4e23cb3c3773e58a297416c1f51996fef059330a
* | Merge "Make sure sort_key_attr is QueryableAttribute when query"Jenkins2015-01-123-44/+78
|\ \ | |/ |/|
| * Make sure sort_key_attr is QueryableAttribute when queryEli Qiao2015-01-093-44/+78
| | | | | | | | | | | | | | | | | | | | When doing query.order_by, sort_key_attr is get from model class, we need to make sure sort_key_attr is really a QueryableAttribute type instance before we do the query or it will cause errors. This will prevent if there IS a function which name is same as sort_key. Closes-Bug: 1405069 Change-Id: I8a3eb08ab3469ec08e05bfce754b664943d65c83
* | Merge "Updated from global requirements"Jenkins2015-01-111-2/+2
|\ \
| * | Updated from global requirementsOpenStack Proposal Bot2015-01-091-2/+2
| | | | | | | | | | | | Change-Id: I76dce91a86cd2e551064068f4312df78f66f0c33