yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #64542
[Bug 1695991] [NEW] "nova-manage db online_data_migrations" doesn't report matched/migrated properly
Public bug reported:
When running "nova-manage db online_data_migrations", it will report how
many items matched the query and how many of the matching items were
migrated.
However, most of the migration routines are not properly reporting the
"total matched" count when "max_count" is specified. This makes it
difficult to know whether you have to call it again or not when
specifying "--max-count" explicitly.
Take for example Flavor.migrate_flavors(). This limits the value of
main_db_ids to a max of "count":
main_db_ids = _get_main_db_flavor_ids(ctxt, count)
count_all = len(main_db_ids)
<snip>
return count_all, count_hit
If someone sees that there were 50 items total and 50 items were
converted, they may think that all the work is done. It would be better
to call _get_main_db_flavor_ids() with no limit to the number of
matches, and apply the limit to the number of conversions.
Alternately, we should document that if --max-count is used then "nova-
manage db online_data_migrations" should be called multiple times until
*no* matches are reported and we can basically ignore the number of
hits. (Or until no hits are reported, which would more closely align
with the code in the case that max-count isn't specified explicitly.)
** Affects: nova
Importance: Undecided
Status: New
** Description changed:
When running "nova-manage db online_data_migrations", it will report how
many items matched the query and how many of the matching items were
migrated.
However, most of the migration routines are not properly reporting the
"total matched" count when "max_count" is specified. This makes it
difficult to know whether you have to call it again or not when
specifying "--max-count" explicitly.
Take for example Flavor.migrate_flavors(). This limits the value of
main_db_ids to a max of "count":
- main_db_ids = _get_main_db_flavor_ids(ctxt, count)
+ main_db_ids = _get_main_db_flavor_ids(ctxt, count)
count_all = len(main_db_ids)
<snip>
return count_all, count_hit
-
- If someone sees that there were 50 items total and 50 items were converted, they may think that all the work is done. It would be better to call _get_main_db_flavor_ids() with no limit to the number of matches, and apply the limit to the number of conversions.
+ If someone sees that there were 50 items total and 50 items were
+ converted, they may think that all the work is done. It would be better
+ to call _get_main_db_flavor_ids() with no limit to the number of
+ matches, and apply the limit to the number of conversions.
Alternately, we should document that if --max-count is used then "nova-
manage db online_data_migrations" should be called multiple times until
*no* matches are reported and we can basically ignore the number of
- hits.
+ hits. (Or until no hits are reported, which would more closely align
+ with the code in the case that max-count isn't specified explicitly.)
--
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/1695991
Title:
"nova-manage db online_data_migrations" doesn't report
matched/migrated properly
Status in OpenStack Compute (nova):
New
Bug description:
When running "nova-manage db online_data_migrations", it will report
how many items matched the query and how many of the matching items
were migrated.
However, most of the migration routines are not properly reporting the
"total matched" count when "max_count" is specified. This makes it
difficult to know whether you have to call it again or not when
specifying "--max-count" explicitly.
Take for example Flavor.migrate_flavors(). This limits the value of
main_db_ids to a max of "count":
main_db_ids = _get_main_db_flavor_ids(ctxt, count)
count_all = len(main_db_ids)
<snip>
return count_all, count_hit
If someone sees that there were 50 items total and 50 items were
converted, they may think that all the work is done. It would be
better to call _get_main_db_flavor_ids() with no limit to the number
of matches, and apply the limit to the number of conversions.
Alternately, we should document that if --max-count is used then
"nova-manage db online_data_migrations" should be called multiple
times until *no* matches are reported and we can basically ignore the
number of hits. (Or until no hits are reported, which would more
closely align with the code in the case that max-count isn't specified
explicitly.)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1695991/+subscriptions