yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #64540
[Bug 1695965] [NEW] "nova-manage db online_data_migrations" exit code is strange
Public bug reported:
If I'm reading the code right, the exit value for "nova-manage db
online_data_migrations" will be 1 if we actually performed some
migrations and 0 if we performed no migrations, either because there
were no remaining migrations or because the migration code raised an
exception.
This seems less than useful for someone attempting to script repeated
calls to this with --max-count set. The caller needs to parse the
output to determine whether or not it was successful.
I think it would make more sense to have the exit code as follows:
0 -- no errors and completed
1 -- one of the migrations raised an exception, needs manual action
3 -- no errors but not yet complete, need to call again
since it would allow for an automated retry based solely on the exit
code.
At the very least, the exit code should be nonzero for the case where
one of the migrations raised an exception, and 0 for the case where no
exception was raised.
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1695965
Title:
"nova-manage db online_data_migrations" exit code is strange
Status in OpenStack Compute (nova):
New
Bug description:
If I'm reading the code right, the exit value for "nova-manage db
online_data_migrations" will be 1 if we actually performed some
migrations and 0 if we performed no migrations, either because there
were no remaining migrations or because the migration code raised an
exception.
This seems less than useful for someone attempting to script repeated
calls to this with --max-count set. The caller needs to parse the
output to determine whether or not it was successful.
I think it would make more sense to have the exit code as follows:
0 -- no errors and completed
1 -- one of the migrations raised an exception, needs manual action
3 -- no errors but not yet complete, need to call again
since it would allow for an automated retry based solely on the exit
code.
At the very least, the exit code should be nonzero for the case where
one of the migrations raised an exception, and 0 for the case where no
exception was raised.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1695965/+subscriptions
Follow ups