2017-06-05 19:05:30 |
Chris Friesen |
bug |
|
|
added bug |
2017-06-05 19:11:26 |
Chris Friesen |
bug |
|
|
added subscriber Dan Smith |
2017-06-05 19:12:07 |
Chris Friesen |
removed subscriber Dan Smith |
|
|
|
2017-06-05 20:11:02 |
Chris Friesen |
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. |
If I'm reading the code right, the return 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 return code as follows:
0 -- no errors and completed
1 -- one of the migrations raised an exception, needs manual action
2 -- 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 return 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.
Also, it appears that when calling this command from the shell the exit code is always zero regardless of the return code of the main() function. This makes the whole thing even less useful for calling from within a bash script. |
|
2017-06-05 20:14:23 |
Chris Friesen |
description |
If I'm reading the code right, the return 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 return code as follows:
0 -- no errors and completed
1 -- one of the migrations raised an exception, needs manual action
2 -- 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 return 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.
Also, it appears that when calling this command from the shell the exit code is always zero regardless of the return code of the main() function. This makes the whole thing even less useful for calling from within a bash script. |
If I'm reading the code right, the return 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 return code as follows:
0 -- no errors and completed
1 -- one of the migrations raised an exception, needs manual action
2 -- 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 return 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. |
|
2017-06-09 15:03:37 |
Sylvain Bauza |
nova: status |
New |
Invalid |
|
2017-06-09 15:03:42 |
Sylvain Bauza |
nova: importance |
Undecided |
Wishlist |
|