summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updated from global requirementsliberty-eolstable/libertyOpenStack Proposal Bot2016-09-061-1/+1
| | | | Change-Id: I0d49b98f99f504766a06b60f7607c7fbe307d3aa
* Catch empty value DBDuplicate errorsKevin Benton2016-07-062-2/+6
| | | | | | | | | | | | | | We can have integrity constraint violations when the value is an empty string. The previous regex for converting these into DBDuplicate exceptions was not considering this case. This adjusts the regex to a 0 or many instead of a 1 or many match for the value and adds a case to a test. Change-Id: Ibf4686f92fcffb8e70ec2735ab878e8849ed37b1 Closes-Bug: #1599086 (cherry picked from commit 16886e55bd8fde77f71d75c3c87c2f71ee6dbd4f)
* Updated from global requirementsOpenStack Proposal Bot2016-04-291-1/+1
| | | | Change-Id: I404c7db6a0a42ab4d486090c5e67afc3b934b4d7
* add reno for release notes managementDoug Hellmann2016-04-239-0/+304
| | | | | | | | | | | | Conflicts: setup.cfg NOTE(mriedem): The dependencies were moved to setup.cfg in Mitaka as extras. This backport just adds reno to test-requirements.txt. Change-Id: I6574d2bb21fa8c64290b06ab493f8f7c8b1b7c16 Signed-off-by: Doug Hellmann <doug@doughellmann.com> (cherry picked from commit 91cd18ef992c80ed5a40eae3a2f84192a334f7b8)
* Don't trace DB errors when we're retryingMatt Riedemann2016-02-042-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a two-part change that is squashed for stable, as the original commit to master introduced undesirable behaviour of logging an unexpected exception before re-raising it. --- Don't trace DB errors when we're retrying If we know we're retrying on DB failures, let's be smarter and not trace an exception at ERROR level while looping, since this clutters up the logs and causes confusion when trying to track down failures. DBDeadlock errors show up quite a bit in q-svc and n-api logs in gate runs but when you check logstash for those, they are primarily in jobs that are successful, so the trace is on the first try in the loop and then we pass on the second try - but the trace itself is confusing while debugging gate failures. So let's just be smarter and log at debug level between retries, and if we hit an unexpected exception, log that error (as before), and raise it up to the caller. Closes-Bug: #1523990 Change-Id: I15b4a9b5c7ec9bfede9ec9989de02c1da46eac81 (cherry picked from commit 838e314a21fef9ca6cf99140b2400e0d3b68b109) *** This is the 2nd commit message: Don't log non-db error in retry wrapper 838e314a21fef9ca6cf99140b2400e0d3b68b109 changed the retry wrapper code to not log exception traces for expected errors, like when retrying on a DBDeadlock. It did, however, log an unexpected exception but was not checking the type, like in the case of a nova OverQuota exception. Since _is_exception_expected already logs at debug level an expected DB error, like DBDeadlock, during a retry loop, we don't need to log it again. And if the exception is unexpected, like OverQuota from nova, then we shouldn't trace that exception in the retry loop before reraising but instead just let the caller handle it. Adds a unit test to make sure that nothing is logged in the unexpected exception case during the retry loop. Co-Authored-By: Sean Dague <sean@dague.net> Change-Id: Ic3e45029378dc96ce01398d9b55f51e20ef08189 Closes-Bug: #1532880
* Fix tests to work under both pymsysql 0.6.2 and 0.7.xDavanum Srinivas2016-02-011-3/+8
| | | | | | | | | | | | | | | | | | | | | In 0.6.2, the exc.statement and exc.params were as follows: exc.statement = {unicode} u'INSERT INTO resource_entity (id, foo_id) VALUES (%s, %s)' exc.params = {tuple} (1, 2) In 0.7.1, the exc.statement and exc.params are as follows: exc.statement = {unicode} u'INSERT INTO resource_entity (id, foo_id) VALUES (%(id)s, %(foo_id)s)' exc.params = {dict} {'id': 1, 'foo_id': 2} So the easiest thing to support both is to use string interpolation and then check if they are equal. This approach works for both py34 and py27 as well. Note that we still have to test the old way for sqlite which has (?, ?) in the SQL statement. Closes-Bug: #1533861 Change-Id: Iab9f0e4b4dd337363dd7e705c1155f3f6517b404 (cherry picked from commit 543d577613a5ccc12f4482d9e2f9ce1f29db21b4)
* Updated from global requirementsOpenStack Proposal Bot2015-10-191-1/+1
| | | | Change-Id: Icf3cbc616703f16ff035f63dbc5e7c1059ef7d69
* Updated from global requirementsOpenStack Proposal Bot2015-09-293-3/+3
| | | | Change-Id: I82cdb02809d6a35f038f6ac38c890f1ce4ea9746
* Update .gitreview for stable/libertyDoug Hellmann2015-09-141-0/+1
| | | | Change-Id: I71a8a243575b8fbfcaa982b137f1884cf228dae8
* Merge "Updated from global requirements"2.6.0Jenkins2015-09-121-1/+1
|\
| * Updated from global requirementsOpenStack Proposal Bot2015-09-071-1/+1
| | | | | | | | Change-Id: I90e470114d974d4539783a8166efcf1d02b9f5d3
* | Imported Translations from TransifexOpenStack Proposal Bot2015-09-101-3/+8
|/ | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I1b4cbf210bcce6de3d2bd34786875e0b9a862c22
* Updated from global requirements2.5.0OpenStack Proposal Bot2015-09-011-1/+1
| | | | Change-Id: I609908b8167136f3b221646e168020a0fe741aaa
* Merge "Imported Translations from Transifex"Jenkins2015-08-271-4/+8
|\
| * Imported Translations from TransifexOpenStack Proposal Bot2015-08-271-4/+8
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I5dbecf9f37b7ecf2397c44c8ac6c2488cc811e11
* | Updated from global requirementsOpenStack Proposal Bot2015-08-271-1/+1
|/ | | | Change-Id: I4e450e889f26423f413f264660fad5cc5d0d72f8
* Updated from global requirementsOpenStack Proposal Bot2015-08-261-1/+1
| | | | Change-Id: Idf081a0897b5753ab28088e8af70c22d10afbe73
* Merge "Assume relative revisions belong to alembic"2.4.1Jenkins2015-08-202-0/+13
|\
| * Assume relative revisions belong to alembicBoris Bobrov2015-08-202-0/+13
| | | | | | | | | | | | | | | | | | migration_cli alembic plugin returned that it doesn't know anything about relative revisions. This cause the situation when one could not perform relative upgrades or downgrades. Change-Id: I3c0eddf75d4a8c91c7a23c6fbad947900ec0ac94 Closes-Bug: 1486790
* | Use correct config key in alembic extensionAndrew Melton2015-08-192-1/+5
|/ | | | | | | | | | While the value we're looking for is passed into the Extension as 'alembic_repo_path' it is actually stored in the alembic config as 'script_location'. This change fixes the call to the alembic config and retrieves 'script_location' instead. Change-Id: Ia328e8230d33dc063c0d377e04f15f1ccaa4d500 Closes-Bug: #1486655
* Fix exception message about unavailable backendAnn Kamyshnikova2015-08-181-1/+1
| | | | | | | | At this moment if MySQL or PosrgreSQL are not installed the tests will be skipped or failed with message 'database '%s' unavailable'. Change 'database' -> 'backend'. Change-Id: Id57f86a007f99c76f2ef2188279cad016433599f
* Merge "Updated from global requirements"2.4.0Jenkins2015-08-181-1/+1
|\
| * Updated from global requirementsOpenStack Proposal Bot2015-08-171-1/+1
| | | | | | | | Change-Id: I1fececc892a4c4720bf768b213d111eb357b387b
* | Imported Translations from TransifexOpenStack Proposal Bot2015-08-181-3/+12
|/ | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I7893a9cb84613c4e7b479e2917d23ffc43fdd1bd
* Merge "Fix hacking rules and docs job"Jenkins2015-08-173-9/+4
|\
| * Fix hacking rules and docs jobDavanum Srinivas2015-08-083-9/+4
| | | | | | | | Change-Id: I2d86f266165ad98ded9f0bb9f11abfd8aa2c09ef
* | Updated from global requirementsOpenStack Proposal Bot2015-08-131-3/+3
|/ | | | Change-Id: I85840c413e6bfc63e2a459b2f4d440683b7f4ebc
* Imported Translations from TransifexOpenStack Proposal Bot2015-08-074-27/+24
| | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I2829fdde93114cfaf3c7acbeaff8ca9c90e9570d
* Merge "pagination: enhance sorting of null values"Jenkins2015-08-062-10/+62
|\
| * pagination: enhance sorting of null valuesMehdi Abaakouk2015-08-062-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | Sort results on nullable column depends on the used backend. Mysql put null after sorted result, while Postgresql do the reverse. This change allows to pass the expected behavior via the sort direction. eg: desc-nullslast, put null values after the sorted result with the value set. Change-Id: Ic637311d84790251e7a3babd290a4da36cbaf73c Closes-bug: #1481749
* | Merge "Upgrade and downgrade based on revision existence"Jenkins2015-08-055-6/+161
|\ \ | |/ |/|
| * Upgrade and downgrade based on revision existenceBoris Bobrov2015-08-055-6/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | Before there was no way to upgrade to a specific revision, because the revision passed to the manager was passed to all the plugins, some of which failed to process it. Add a new method to every plugin `has_revision`, which returns whether the plugin has the revision. Use it in upgrade and downgrade. Change-Id: I89b02d7ad479da6bff3c492c88edfee9c19abc22 Closes-Bug: 1474067
* | Imported Translations from TransifexOpenStack Proposal Bot2015-08-0412-24/+24
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Id11932b6ea99cf9b69648a6c659623b82f4ee99d
* | Merge "Updated from global requirements"Jenkins2015-08-041-1/+1
|\ \
| * | Updated from global requirementsOpenStack Proposal Bot2015-08-041-1/+1
| | | | | | | | | | | | Change-Id: I015ad91a17539c2f8ab58abeee3157d8dcc557ff
* | | Merge "Added catching of errors 1047 (Galera) for MySQL oslo db reconnect"Jenkins2015-08-042-1/+19
|\ \ \ | |/ / |/| |
| * | Added catching of errors 1047 (Galera) for MySQL oslo db reconnectDavanum Srinivas2015-07-142-1/+19
| |/ | | | | | | | | | | | | | | | | | | Any service using oslo db reconnect feature should catch 1047 mysqldb error which happens after galera cluster is in non-primary state. If we don't do this, it can lead cluster being non-functional even after galera functioning is restored. Closes-Bug: #1312212 Change-Id: I4fa98c1dd49b7d6ed4305bd938e29b20ec7e31fb
* | Merge "Add JSON-encoded types for sqlalchemy"Jenkins2015-08-032-0/+148
|\ \
| * | Add JSON-encoded types for sqlalchemyDmitry Tantsur2015-08-032-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code is imported from Ironic with new tests, so that it can be reused in other projects (I need it for ironic-inspector). Some small enhancements were made to the imported code: * Non-capitalized JSON word in names * Base type can be used on its own Change-Id: Ic991f34c5b5f091d8627643367cdaa73ad2b1236
* | | Merge "Imported Translations from Transifex"2.3.0Jenkins2015-07-311-2/+10
|\ \ \
| * | | Imported Translations from TransifexOpenStack Proposal Bot2015-07-311-2/+10
| |/ / | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Ibd16abb0279fdb401bf783729850cc55fccc6c85
* | | Merge "Python 3: Use use_unicode=1 under Python 3"Jenkins2015-07-312-7/+16
|\ \ \ | |/ / |/| |
| * | Python 3: Use use_unicode=1 under Python 3fumihiko kakuma2015-07-302-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting use_unicode=1 allows DBAPI to handle the encoding and decoding of unicode. We can see the details from the following url. http://docs.sqlalchemy.org/en/rel_0_9/dialects/mysql.html#unicode-encoding-decoding Change-Id: I4bb67d9c8a439ee18acdcf227140dfff1a70cd93 Closes-Bug: #1479313
* | | Merge "Fix test_migrations on Python 3"Jenkins2015-07-302-10/+16
|\ \ \
| * | | Fix test_migrations on Python 3Victor Stinner2015-07-282-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | migrate.versioning.api.VerNum() conversion to integer doesn't work in all cases. Cast explicitly to int in WalkVersionsMixin.walk_versions() to fix this issue. Modify unit tests to use VerNum objects instead of using directly integers. The bug was not seen in tests because tests used int numbers. Example of error: Traceback (most recent call last): ... File "oslo_db/sqlalchemy/test_migrations.py", line 189, in walk_versions versions = range(self.INIT_VERSION + 1, self.REPOSITORY.latest + 1) TypeError: 'VerNum' object cannot be interpreted as an integer This bug impact for example glance.tests.unit.test_migrations of the Glance project. Change-Id: I043a66268b957b97f2e8f652c0ee8aec3a00e8dd
* | | | Imported Translations from TransifexOpenStack Proposal Bot2015-07-2917-68/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: Iba5576833eca3c57be3e81662ce92f126801aeaf
* | | | Updated from global requirementsOpenStack Proposal Bot2015-07-291-1/+1
| |/ / |/| | | | | | | | Change-Id: I7b72630c0601f7d5ddbef4813bf938809ef46248
* | | Improve failure mode handling in enginefacadeMike Bayer2015-07-274-7/+96
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check explicitly for the cases where no "sql_connection" attribute was set when running _start(), so that the lack of this parameter is documented by the exception rather than failing into create_engine() with an unclear failure mode. If _start() fails as it will here, make sure _started stays False so that repeated calls to _start() continue to raise the same exception, rather than raising attribute errors. When accessing the "session" or "connection" attributes of the context when these attributes were not requested by the decorator or context manager, raise explicit exceptions for each, rather than returning None which leads to hard-to-debug NoneType errors. Change-Id: Iadfbf4707daed4140285a3a472009f6863b18275 Closes-bug: 1477080
* | Merge "Updated from global requirements"2.2.0Jenkins2015-07-231-2/+1
|\ \
| * | Updated from global requirementsOpenStack Proposal Bot2015-07-221-2/+1
| | | | | | | | | | | | Change-Id: I78c3e37c0f4693523ac373e1c343656136400ea6