Merge "Cleanup comments around claim_resources method"
This commit is contained in:
commit
984ac9fa96
|
@ -922,7 +922,7 @@ class ComputeTaskManager(base.Base):
|
|||
'not found.', instance.host, instance.node,
|
||||
instance=instance)
|
||||
|
||||
# TODO(mriedem): In Queens, call select_destinations() with a
|
||||
# TODO(mriedem): Call select_destinations() with a
|
||||
# skip_filters=True flag so the scheduler does the work of
|
||||
# claiming resources on the destination in Placement but still
|
||||
# bypass the scheduler filters, which honors the 'force' flag
|
||||
|
|
|
@ -97,7 +97,7 @@ class LiveMigrationTask(base.TaskBase):
|
|||
# to the destination compute node. Normally select_destinations()
|
||||
# in the scheduler would do this for us, but when forcing the
|
||||
# target host we don't call the scheduler.
|
||||
# TODO(mriedem): In Queens, call select_destinations() with a
|
||||
# TODO(mriedem): Call select_destinations() with a
|
||||
# skip_filters=True flag so the scheduler does the work of claiming
|
||||
# resources on the destination in Placement but still bypass the
|
||||
# scheduler filters, which honors the 'force' flag in the API.
|
||||
|
|
|
@ -1524,13 +1524,16 @@ class SchedulerReportClient(object):
|
|||
return allocations.get(
|
||||
rp_uuid, {}).get('resources', {})
|
||||
|
||||
# NOTE(jaypipes): Currently, this method is ONLY used in two places:
|
||||
# NOTE(jaypipes): Currently, this method is ONLY used in three places:
|
||||
# 1. By the scheduler to allocate resources on the selected destination
|
||||
# hosts.
|
||||
# 2. By the conductor LiveMigrationTask to allocate resources on a forced
|
||||
# destination host. This is a short-term fix for Pike which should be
|
||||
# replaced in Queens by conductor calling the scheduler in the force
|
||||
# host case.
|
||||
# destination host. In this case, the source node allocations have
|
||||
# already been moved to the migration record so the instance should not
|
||||
# have allocations and _move_operation_alloc_request will not be called.
|
||||
# 3. By the conductor ComputeTaskManager to allocate resources on a forced
|
||||
# destination host during evacuate. This case will call the
|
||||
# _move_operation_alloc_request method.
|
||||
# This method should not be called by the resource tracker.
|
||||
@safe_connect
|
||||
@retries
|
||||
|
@ -1546,10 +1549,7 @@ class SchedulerReportClient(object):
|
|||
host). In order to prevent compute nodes currently performing move
|
||||
operations from being scheduled to improperly, we create a "doubled-up"
|
||||
allocation that consumes resources on *both* the source and the
|
||||
destination host during the move operation. When the move operation
|
||||
completes, the destination host will end up setting allocations for the
|
||||
instance only on the destination host thereby freeing up resources on
|
||||
the source host appropriately.
|
||||
destination host during the move operation.
|
||||
|
||||
:param context: The security context
|
||||
:param consumer_uuid: The instance's UUID.
|
||||
|
|
|
@ -596,9 +596,7 @@ def claim_resources_on_destination(
|
|||
# the host. This is because we need Placement to have an
|
||||
# accurate reflection of what's allocated on all nodes so the
|
||||
# scheduler can make accurate decisions about which nodes have
|
||||
# capacity for building an instance. We also cannot rely on the
|
||||
# resource tracker in the compute service automatically healing
|
||||
# the allocations since that code is going away in Queens.
|
||||
# capacity for building an instance.
|
||||
reason = (_('Unable to move instance %(instance_uuid)s to '
|
||||
'host %(host)s. There is not enough capacity on '
|
||||
'the host for the instance.') %
|
||||
|
|
Loading…
Reference in New Issue