Merge "Refine comments about move_allocations"

This commit is contained in:
Zuul
2019-10-09 21:06:59 +00:00
committed by Gerrit Code Review
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -4553,10 +4553,10 @@ class ComputeManager(manager.Manager):
'%(mig)s for instance',
{'rp_uuids': orig_alloc.keys(), 'mig': migration.uuid},
instance=instance)
# FIXME(gibi): This method is flawed in that it assumes every
# allocation held by the migration uuid are against the destination
# compute RP tree. So it might overwrite allocation against a
# shared provider if we had one.
# FIXME(gibi): This method is flawed in that it does not handle
# allocations against sharing providers in any special way. This leads
# to duplicate allocations against the sharing provider during
# migration.
# TODO(cdent): Should we be doing anything with return values here?
self.reportclient.move_allocations(context, migration.uuid,
instance.uuid)
+6 -6
View File
@@ -65,9 +65,9 @@ def replace_allocation_with_migration(context, instance, migration):
instance=instance)
return None, None
# FIXME(danms): This method is flawed in that it asssumes allocations
# against only one provider. So, this may overwite allocations against
# a shared provider, if we had one.
# FIXME(gibi): This method is flawed in that it does not handle allocations
# against sharing providers in any special way. This leads to duplicate
# allocations against the sharing provider during migration.
success = reportclient.move_allocations(context, instance.uuid,
migration.uuid)
if not success:
@@ -93,9 +93,9 @@ def revert_allocation_for_migration(context, source_cn, instance, migration):
reportclient = report.SchedulerReportClient()
# FIXME(danms): This method is flawed in that it asssumes allocations
# against only one provider. So, this may overwite allocations against
# a shared provider, if we had one.
# FIXME(gibi): This method is flawed in that it does not handle allocations
# against sharing providers in any special way. This leads to duplicate
# allocations against the sharing provider during migration.
success = reportclient.move_allocations(context, migration.uuid,
instance.uuid)
if not success: