| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I0d49b98f99f504766a06b60f7607c7fbe307d3aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Change-Id: I404c7db6a0a42ab4d486090c5e67afc3b934b4d7
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Change-Id: Icf3cbc616703f16ff035f63dbc5e7c1059ef7d69
|
|
|
|
| |
Change-Id: I82cdb02809d6a35f038f6ac38c890f1ce4ea9746
|
|
|
|
| |
Change-Id: I71a8a243575b8fbfcaa982b137f1884cf228dae8
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I90e470114d974d4539783a8166efcf1d02b9f5d3
|
|/
|
|
|
|
|
| |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I1b4cbf210bcce6de3d2bd34786875e0b9a862c22
|
|
|
|
| |
Change-Id: I609908b8167136f3b221646e168020a0fe741aaa
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I5dbecf9f37b7ecf2397c44c8ac6c2488cc811e11
|
|/
|
|
| |
Change-Id: I4e450e889f26423f413f264660fad5cc5d0d72f8
|
|
|
|
| |
Change-Id: Idf081a0897b5753ab28088e8af70c22d10afbe73
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I1fececc892a4c4720bf768b213d111eb357b387b
|
|/
|
|
|
|
|
| |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I7893a9cb84613c4e7b479e2917d23ffc43fdd1bd
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I2d86f266165ad98ded9f0bb9f11abfd8aa2c09ef
|
|/
|
|
| |
Change-Id: I85840c413e6bfc63e2a459b2f4d440683b7f4ebc
|
|
|
|
|
|
|
| |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I2829fdde93114cfaf3c7acbeaff8ca9c90e9570d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: Id11932b6ea99cf9b69648a6c659623b82f4ee99d
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I015ad91a17539c2f8ab58abeee3157d8dcc557ff
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: Ibd16abb0279fdb401bf783729850cc55fccc6c85
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: Iba5576833eca3c57be3e81662ce92f126801aeaf
|
| |/ /
|/| |
| | |
| | | |
Change-Id: I7b72630c0601f7d5ddbef4813bf938809ef46248
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I78c3e37c0f4693523ac373e1c343656136400ea6
|