Add regression test for bug 1824435
This adds a regression test in our post test hook. We are not able to do a similar test in the unit or functional tests because SQLite does not provide any isolation between transactions on the same database connection [1] and the bug can only be reproduced with the isolation that is present when using a real MySQL database. Related-Bug: #1824435 [1] https://www.sqlite.org/isolation.html NOTE(melwitt): The differences from the Train change is because change If133b12bf02d708c099504a88b474dce0bdb0f00 is not in Stein. We need to pass the cell1 config to the archive command because we don't have --all-cells. Change-Id: I204361d6ff7c2323bc744878d8a9fa2d20a480b1 (cherry picked from commit7c41365f19
) (cherry picked from commit73b6cb897e
)
This commit is contained in:
parent
4ac84adf65
commit
844209b064
|
@ -116,3 +116,26 @@ if [[ "$allocations" == "" ]]; then
|
|||
echo "Failed to heal allocations."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "Verifying online_data_migrations idempotence"
|
||||
# We will re-use the server created earlier for this test. (A server needs to
|
||||
# be present during the run of online_data_migrations and archiving).
|
||||
|
||||
# Run the online data migrations before archiving.
|
||||
$MANAGE db online_data_migrations
|
||||
|
||||
# We need to archive the deleted marker instance used by the
|
||||
# fill_virtual_interface_list online data migration in order to trigger
|
||||
# creation of a new deleted marker instance.
|
||||
set +e
|
||||
archive_deleted_rows $conf
|
||||
|
||||
# Verify whether online data migrations run after archiving will succeed.
|
||||
# See for more details: https://bugs.launchpad.net/nova/+bug/1824435
|
||||
$MANAGE db online_data_migrations
|
||||
rc=$?
|
||||
set -e
|
||||
if [[ $rc -ne 2 ]]; then
|
||||
echo "Expected return code 2 from online_data_migrations until bug 1824435 is fixed"
|
||||
exit 2
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue