Merge "Follow up for QoS interface attach"
This commit is contained in:
commit
c172377a00
|
@ -7599,6 +7599,13 @@ class ComputeManager(manager.Manager):
|
||||||
if not request_groups:
|
if not request_groups:
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
# NOTE(gibi): we assume a single RequestGroup here as:
|
||||||
|
# 1) there can only be a single port per interface attach request
|
||||||
|
# 2) a single port can only request resources in a single RequestGroup
|
||||||
|
# as per the current neutron API.
|
||||||
|
# #2) might change in the future so both
|
||||||
|
# nova.network.neutron.API.create_resource_requests() and this function
|
||||||
|
# takes a list of groups
|
||||||
request_group = request_groups[0]
|
request_group = request_groups[0]
|
||||||
|
|
||||||
# restrict the resource request to the current compute node. The
|
# restrict the resource request to the current compute node. The
|
||||||
|
|
|
@ -1755,7 +1755,9 @@ class SchedulerReportClient(object):
|
||||||
context, consumer_uuid, resources):
|
context, consumer_uuid, resources):
|
||||||
error_reason = _("Cannot remove resources %s from the allocation "
|
error_reason = _("Cannot remove resources %s from the allocation "
|
||||||
"due to multiple successive generation conflicts "
|
"due to multiple successive generation conflicts "
|
||||||
"in placement.")
|
"in placement. To clean up the leaked resource "
|
||||||
|
"allocation you can use nova-manage placement "
|
||||||
|
"audit.")
|
||||||
raise exception.AllocationUpdateFailed(
|
raise exception.AllocationUpdateFailed(
|
||||||
consumer_uuid=consumer_uuid,
|
consumer_uuid=consumer_uuid,
|
||||||
error=error_reason % resources)
|
error=error_reason % resources)
|
||||||
|
|
|
@ -6406,13 +6406,23 @@ class PortResourceRequestBasedSchedulingTest(
|
||||||
self.assertComputeAllocationMatchesFlavor(
|
self.assertComputeAllocationMatchesFlavor(
|
||||||
allocations, self.compute1_rp_uuid, self.flavor)
|
allocations, self.compute1_rp_uuid, self.flavor)
|
||||||
|
|
||||||
sriov_allocations = allocations[
|
sriov_dev_rp = self.sriov_dev_rp_per_host[
|
||||||
self.sriov_dev_rp_per_host[
|
self.compute1_rp_uuid][self.PF2]
|
||||||
self.compute1_rp_uuid][self.PF2]]['resources']
|
sriov_allocations = allocations[sriov_dev_rp]['resources']
|
||||||
|
|
||||||
# this is the leaked allocation in placement
|
# this is the leaked allocation in placement
|
||||||
self.assertPortMatchesAllocation(sriov_port, sriov_allocations)
|
self.assertPortMatchesAllocation(sriov_port, sriov_allocations)
|
||||||
|
|
||||||
|
allocations[sriov_dev_rp].pop('generation')
|
||||||
|
leaked_allocation = {sriov_dev_rp: allocations[sriov_dev_rp]}
|
||||||
|
self.assertIn(
|
||||||
|
f'Failed to update allocations for consumer {server["id"]}. '
|
||||||
|
f'Error: Cannot remove resources {leaked_allocation} from the '
|
||||||
|
f'allocation due to multiple successive generation conflicts in '
|
||||||
|
f'placement. To clean up the leaked resource allocation you can '
|
||||||
|
f'use nova-manage placement audit.',
|
||||||
|
self.stdlog.logger.output)
|
||||||
|
|
||||||
# We expect that the port binding is not updated with any RP uuid as
|
# We expect that the port binding is not updated with any RP uuid as
|
||||||
# the attach failed.
|
# the attach failed.
|
||||||
sriov_binding = sriov_port['binding:profile']
|
sriov_binding = sriov_port['binding:profile']
|
||||||
|
|
Loading…
Reference in New Issue