1) When used without the --max-count option, the summary table will
always show zero migrations run, because it only accounts for the
last batch, and the loop only exits when the last batch does no work.
2) "remaining" counts cannot be accurate, given the way migrations are
implemented, because the "found" count refers to the number of rows
that exist in the database, not the number that still need the
migration applied.
3) In the case where no migrations are successful, but some raise
exceptions, the command was exiting with status zero, which usually
indicates "success". This can cause issues that cause migration
failures to go unnoticed, especially when automated.
4) When exceptions do occur, a minimally useful message is output, and
no detail about the exception is available to the user. The exception
detail should be logged.
5) Inaccuracies in the documentation - "--max_number" should be "--max-count", and stale references to the "--ignore_state" option,
which was removed in [1]
The solution for (3) introduces a new exit status, 2. See release note
for details.
These changes are aligned with equivalents [2][3] for the nova-manage
command, except for the calculation of "Total Needed" - nova seems to
interpret the "found" count differently/inconsistently.
Reviewed: https:/ /review. openstack. org/614617 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=74fd810ad1a 8561ba150925d19 feb8cbe598fe84
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 74fd810ad1a8561 ba150925d19feb8 cbe598fe84
Author: imacdonn <email address hidden>
Date: Wed Oct 17 22:48:18 2018 +0000
cinder-manage online_ data_migrations fixes
Addresses some issues with this command:
1) When used without the --max-count option, the summary table will
always show zero migrations run, because it only accounts for the
last batch, and the loop only exits when the last batch does no work.
2) "remaining" counts cannot be accurate, given the way migrations are
implemented, because the "found" count refers to the number of rows
that exist in the database, not the number that still need the
migration applied.
3) In the case where no migrations are successful, but some raise
exceptions, the command was exiting with status zero, which usually
indicates "success". This can cause issues that cause migration
failures to go unnoticed, especially when automated.
4) When exceptions do occur, a minimally useful message is output, and
no detail about the exception is available to the user. The exception
detail should be logged.
5) Inaccuracies in the documentation - "--max_number" should be
"--max- count", and stale references to the "--ignore_state" option,
which was removed in [1]
The solution for (3) introduces a new exit status, 2. See release note
for details.
These changes are aligned with equivalents [2][3] for the nova-manage inconsistently.
command, except for the calculation of "Total Needed" - nova seems to
interpret the "found" count differently/
[1] https:/ /review. openstack. org/510201 /review. openstack. org/605828 /review. openstack. org/608091
[2] https:/
[3] https:/
Change-Id: I878480eb235962 5cde839b0732308 44acc645cba 1cdab50d73f6484 289ab082d4)
Closes-Bug: #1794364
Closes-Bug: #1796192
(cherry picked from commit d47486d317e8cdb