dd8354efc1
When online_data_migrations raise exceptions, nova/cinder-manage catches
the exceptions, prints fairly useless "something didn't work" messages,
and moves on. Two issues:
1) The user(/admin) has no way to see what actually failed (exception
detail is not logged)
2) The command returns exit status 0, as if all possible migrations have
been completed successfully - this can cause failures to get missed,
especially if automated
This change adds logging of the exceptions, and introduces a new exit
status of 2, which indicates that no updates took effect in the last
batch attempt, but some are (still) failing, which requires intervention.
Change-Id: Ib684091af0b19e62396f6becc78c656c49a60504
Closes-Bug: #1796192
(cherry picked from commit 3eea37b85b
)
14 lines
769 B
YAML
14 lines
769 B
YAML
---
|
|
upgrade:
|
|
- |
|
|
The ``nova-manage db online_data_migrations`` command now returns exit
|
|
status 2 in the case where some migrations failed (raised exceptions) and
|
|
no others were completed successfully from the last batch attempted. This
|
|
should be considered a fatal condition that requires intervention. Exit
|
|
status 1 will be returned in the case where the ``--max-count`` option was
|
|
used and some migrations failed but others succeeded (updated at least one
|
|
row), because more work may remain for the non-failing migrations, and
|
|
their completion may be a dependency for the failing ones. The command
|
|
should be reiterated while it returns exit status 1, and considered
|
|
completed successfully only when it returns exit status 0.
|