Refine comments about move_allocations
Since Ie991d4b53e9bb5e7ec26da99219178ab7695abf6 move_allocation handles more than one resource provider, but still does not handle sharing providers. This patch refines the code comments accordingly. Change-Id: I7884361e32a8c9765256c0a9b16e54e3f9a82084
This commit is contained in:
@@ -4456,10 +4456,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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user