ovs: Add support for packet processing info report
This change introduces support for parameters used to report packet processing info to placement, which was added during the current Yoga cycle[1]. [1] 1ea26616b41335b24b9c162062740ee3de78372d Change-Id: I61d0a5340da6216fb4d885abebc4f109a6fe22b4
This commit is contained in:
@@ -203,6 +203,16 @@
|
||||
# (optional) List of <bridge>:<hypervisor>
|
||||
# Defaults to empty list
|
||||
#
|
||||
# [*resource_provider_packet_processing_without_direction*]
|
||||
# (optional) List of <hypervisor>:<packet_rate> tuples, defining the minimum
|
||||
# pachet rate the OVS backend can guarantee in kilo (1000) packet per second.
|
||||
# Defaults to empty list
|
||||
#
|
||||
# [*resource_provider_packet_processing_with_direction*]
|
||||
# (optional) Similar to resource_provider_packet_processing_without_direction
|
||||
# but used in case the OVS backend has hardware offload capabilities.
|
||||
# Defauls to empty list
|
||||
#
|
||||
# [*resource_provider_default_hypervisor*]
|
||||
# (optional) The default hypervisor name used to locate the parent of
|
||||
# the resource provider.
|
||||
@@ -213,6 +223,11 @@
|
||||
# rate inventories,.
|
||||
# Defauls to empty hash
|
||||
#
|
||||
# [*resource_provider_packet_processing_inventory_defaults*]
|
||||
# (optional) Key:value pairs to specify defaults used while reporting packet
|
||||
# rate inventories,.
|
||||
# Defauls to empty hash
|
||||
#
|
||||
# [*explicitly_egress_direct*]
|
||||
# (optional) When set to True, the accepted egress unicast traffic will not
|
||||
# use action NORMAL. The accepted egress packets will be taken care of in the
|
||||
@@ -274,9 +289,15 @@ class neutron::agents::ml2::ovs (
|
||||
$bridge_mac_table_size = $::os_service_default,
|
||||
$igmp_snooping_enable = $::os_service_default,
|
||||
$resource_provider_bandwidths = [],
|
||||
$resource_provider_packet_processing_without_direction
|
||||
= [],
|
||||
$resource_provider_packet_processing_with_direction
|
||||
= [],
|
||||
$resource_provider_hypervisors = [],
|
||||
$resource_provider_default_hypervisor = $::os_service_default,
|
||||
$resource_provider_inventory_defaults = {},
|
||||
$resource_provider_packet_processing_inventory_defaults
|
||||
= {},
|
||||
$explicitly_egress_direct = $::os_service_default,
|
||||
$network_log_rate_limit = $::os_service_default,
|
||||
$network_log_burst_limit = $::os_service_default,
|
||||
@@ -380,21 +401,59 @@ class neutron::agents::ml2::ovs (
|
||||
$resource_provider_hypervisors_real = $::os_service_default
|
||||
}
|
||||
|
||||
if ($resource_provider_packet_processing_without_direction != []){
|
||||
$resource_provider_packet_processing_without_direction_real =
|
||||
join(any2array($resource_provider_packet_processing_without_direction), ',')
|
||||
} else {
|
||||
$resource_provider_packet_processing_without_direction_real = $::os_service_default
|
||||
}
|
||||
|
||||
if ($resource_provider_packet_processing_with_direction != []){
|
||||
$resource_provider_packet_processing_with_direction_real =
|
||||
join(any2array($resource_provider_packet_processing_with_direction), ',')
|
||||
} else {
|
||||
$resource_provider_packet_processing_with_direction_real = $::os_service_default
|
||||
}
|
||||
|
||||
if empty($resource_provider_inventory_defaults) {
|
||||
$resource_provider_inventory_defaults_real = $::os_service_default
|
||||
} else {
|
||||
if ($resource_provider_inventory_defaults =~ Hash){
|
||||
$resource_provider_inventory_defaults_real = join(join_keys_to_values($resource_provider_inventory_defaults, ':'), ',')
|
||||
$resource_provider_inventory_defaults_real =
|
||||
join(join_keys_to_values($resource_provider_inventory_defaults, ':'), ',')
|
||||
} else {
|
||||
$resource_provider_inventory_defaults_real = join(any2array($resource_provider_inventory_defaults), ',')
|
||||
$resource_provider_inventory_defaults_real =
|
||||
join(any2array($resource_provider_inventory_defaults), ',')
|
||||
}
|
||||
}
|
||||
|
||||
if empty($resource_provider_packet_processing_inventory_defaults) {
|
||||
$resource_provider_packet_processing_inventory_defaults_real = $::os_service_default
|
||||
} else {
|
||||
if ($resource_provider_packet_processing_inventory_defaults =~ Hash){
|
||||
$resource_provider_packet_processing_inventory_defaults_real =
|
||||
join(join_keys_to_values($resource_provider_packet_processing_inventory_defaults, ':'), ',')
|
||||
} else {
|
||||
$resource_provider_packet_processing_inventory_defaults_real =
|
||||
join(any2array($resource_provider_packet_processing_inventory_defaults), ',')
|
||||
}
|
||||
}
|
||||
|
||||
neutron_agent_ovs {
|
||||
'ovs/resource_provider_bandwidths': value => $resource_provider_bandwidths_real;
|
||||
'ovs/resource_provider_hypervisors': value => $resource_provider_hypervisors_real;
|
||||
'ovs/resource_provider_default_hypervisor': value => $resource_provider_default_hypervisor;
|
||||
'ovs/resource_provider_inventory_defaults': value => $resource_provider_inventory_defaults_real;
|
||||
'ovs/resource_provider_bandwidths':
|
||||
value => $resource_provider_bandwidths_real;
|
||||
'ovs/resource_provider_hypervisors':
|
||||
value => $resource_provider_hypervisors_real;
|
||||
'ovs/resource_provider_packet_processing_without_direction':
|
||||
value => $resource_provider_packet_processing_without_direction_real;
|
||||
'ovs/resource_provider_packet_processing_with_direction':
|
||||
value => $resource_provider_packet_processing_with_direction_real;
|
||||
'ovs/resource_provider_default_hypervisor':
|
||||
value => $resource_provider_default_hypervisor;
|
||||
'ovs/resource_provider_inventory_defaults':
|
||||
value => $resource_provider_inventory_defaults_real;
|
||||
'ovs/resource_provider_packet_processing_inventory_defaults':
|
||||
value => $resource_provider_packet_processing_inventory_defaults_real;
|
||||
}
|
||||
|
||||
neutron_agent_ovs {
|
||||
|
9
releasenotes/notes/pps-config-ovs-d47b70922b4c53c2.yaml
Normal file
9
releasenotes/notes/pps-config-ovs-d47b70922b4c53c2.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The following parameters have been added to
|
||||
the ``neutron::agent::ml2::ovs`` class.
|
||||
|
||||
- ``resource_provider_packet_processing_without_direction``
|
||||
- ``resource_provider_packet_processing_with_direction``
|
||||
- ``resource_provider_packet_processing_inventory_defaults``
|
@@ -72,10 +72,16 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_without_direction').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_with_direction').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_inventory_defaults').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_inventory_defaults').\
|
||||
with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('agent/explicitly_egress_direct').with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('network_log/rate_limit').with_value('<SERVICE DEFAULT>')
|
||||
should contain_neutron_agent_ovs('network_log/burst_limit').with_value('<SERVICE DEFAULT>')
|
||||
@@ -339,8 +345,11 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
params.merge!(
|
||||
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
||||
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
||||
:resource_provider_packet_processing_without_direction => [':1000:1000'],
|
||||
:resource_provider_packet_processing_with_direction => [':2000:2000'],
|
||||
:resource_provider_default_hypervisor => 'compute-c',
|
||||
:resource_provider_inventory_defaults => ['allocation_ratio:1.0', 'min_unit:1', 'step_size:1'],
|
||||
:resource_provider_packet_processing_inventory_defaults => ['allocation_ratio:2.0', 'min_unit:2', 'step_size:2'],
|
||||
)
|
||||
end
|
||||
|
||||
@@ -349,10 +358,16 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
with_value('provider-a,provider-b')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||
with_value('provider-a:compute-a,provider-b:compute-b')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_without_direction').\
|
||||
with_value(':1000:1000')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_with_direction').\
|
||||
with_value(':2000:2000')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
|
||||
with_value('compute-c')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_inventory_defaults').\
|
||||
with_value('allocation_ratio:1.0,min_unit:1,step_size:1')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_inventory_defaults').\
|
||||
with_value('allocation_ratio:2.0,min_unit:2,step_size:2')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -364,12 +379,19 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
'min_unit' => '1',
|
||||
'step_size' => '1'
|
||||
},
|
||||
:resource_provider_packet_processing_inventory_defaults => {
|
||||
'allocation_ratio' => '2.0',
|
||||
'min_unit' => '2',
|
||||
'step_size' => '2'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures resource providers' do
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_inventory_defaults').\
|
||||
with_value('allocation_ratio:1.0,min_unit:1,step_size:1')
|
||||
should contain_neutron_agent_ovs('ovs/resource_provider_packet_processing_inventory_defaults').\
|
||||
with_value('allocation_ratio:2.0,min_unit:2,step_size:2')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user