Support neutron_sriov_physnet_mappings to support multiple devices
Change-Id: Ifcedcc72307732393a92a702a7567addc043b5b2
This commit is contained in:
parent
fa48cc7eaf
commit
c24a280bee
@ -938,6 +938,10 @@ neutron_admin_endpoint: "{{ admin_protocol }}://{{ neutron_internal_fqdn | put_a
|
|||||||
neutron_internal_endpoint: "{{ internal_protocol }}://{{ neutron_internal_fqdn | put_address_in_context('url') }}:{{ neutron_server_port }}"
|
neutron_internal_endpoint: "{{ internal_protocol }}://{{ neutron_internal_fqdn | put_address_in_context('url') }}:{{ neutron_server_port }}"
|
||||||
neutron_public_endpoint: "{{ public_protocol }}://{{ neutron_external_fqdn | put_address_in_context('url') }}:{{ neutron_server_port }}"
|
neutron_public_endpoint: "{{ public_protocol }}://{{ neutron_external_fqdn | put_address_in_context('url') }}:{{ neutron_server_port }}"
|
||||||
|
|
||||||
|
# SRIOV physnet:interface mappings when SRIOV is enabled
|
||||||
|
# "sriovnet1" and tunnel_interface used here as placeholders
|
||||||
|
neutron_sriov_physnet_mappings:
|
||||||
|
sriovnet1: "{{ tunnel_interface }}"
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Nova options
|
# Nova options
|
||||||
|
@ -399,6 +399,8 @@ mechanism_drivers:
|
|||||||
enabled: "{{ neutron_plugin_agent != 'ovn' }}"
|
enabled: "{{ neutron_plugin_agent != 'ovn' }}"
|
||||||
- name: "ovn"
|
- name: "ovn"
|
||||||
enabled: "{{ neutron_plugin_agent == 'ovn' }}"
|
enabled: "{{ neutron_plugin_agent == 'ovn' }}"
|
||||||
|
- name: "sriovnicswitch"
|
||||||
|
enabled: "{{ enable_neutron_sriov | bool }}"
|
||||||
|
|
||||||
neutron_mechanism_drivers: "{{ mechanism_drivers | selectattr('enabled', 'equalto', true) | list }}"
|
neutron_mechanism_drivers: "{{ mechanism_drivers | selectattr('enabled', 'equalto', true) | list }}"
|
||||||
|
|
||||||
@ -473,6 +475,8 @@ agent_extensions:
|
|||||||
enabled: "{{ enable_neutron_qos | bool }}"
|
enabled: "{{ enable_neutron_qos | bool }}"
|
||||||
- name: "sfc"
|
- name: "sfc"
|
||||||
enabled: "{{ enable_neutron_sfc | bool }}"
|
enabled: "{{ enable_neutron_sfc | bool }}"
|
||||||
|
- name: "fdb"
|
||||||
|
enabled: "{{ enable_neutron_sriov | bool }}"
|
||||||
|
|
||||||
neutron_agent_extensions: "{{ agent_extensions | selectattr('enabled', 'equalto', true) | list }}"
|
neutron_agent_extensions: "{{ agent_extensions | selectattr('enabled', 'equalto', true) | list }}"
|
||||||
|
|
||||||
@ -574,3 +578,8 @@ neutron_ks_users:
|
|||||||
user: "{{ neutron_keystone_user }}"
|
user: "{{ neutron_keystone_user }}"
|
||||||
password: "{{ neutron_keystone_password }}"
|
password: "{{ neutron_keystone_password }}"
|
||||||
role: "admin"
|
role: "admin"
|
||||||
|
|
||||||
|
####################
|
||||||
|
# SRIOV
|
||||||
|
####################
|
||||||
|
neutron_sriov_physnets: "{{ neutron_sriov_physnet_mappings.items() | map('join', ':') | join(',') }}"
|
||||||
|
@ -12,3 +12,10 @@ firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
|||||||
[vxlan]
|
[vxlan]
|
||||||
l2_population = true
|
l2_population = true
|
||||||
local_ip = {{ tunnel_interface_address }}
|
local_ip = {{ tunnel_interface_address }}
|
||||||
|
|
||||||
|
{% if enable_neutron_sriov | bool %}
|
||||||
|
[FDB]
|
||||||
|
# Allows instances using sriov ports to communicate with instances that do not.
|
||||||
|
# See https://docs.openstack.org/neutron/latest/admin/config-sriov.html
|
||||||
|
shared_physical_device_mappings = {{ neutron_sriov_physnets }}
|
||||||
|
{% endif %}
|
||||||
|
@ -23,3 +23,10 @@ local_ip = {{ tunnel_interface_address }}
|
|||||||
{% if enable_nova_fake | bool %}
|
{% if enable_nova_fake | bool %}
|
||||||
integration_bridge = br-int-{{ item }}
|
integration_bridge = br-int-{{ item }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if enable_neutron_sriov | bool %}
|
||||||
|
[FDB]
|
||||||
|
# Allows instances using sriov ports to communicate with instances that do not.
|
||||||
|
# See https://docs.openstack.org/neutron/latest/admin/config-sriov.html
|
||||||
|
shared_physical_device_mappings = {{ neutron_sriov_physnets }}
|
||||||
|
{% endif %}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
[sriov_nic]
|
[sriov_nic]
|
||||||
# 'physical_device_mappings' is a comma separated list
|
# 'physical_device_mappings' is a comma separated list
|
||||||
# Maps a physical network to network inferface used for SRIOV
|
# Maps a physical network to network inferface used for SRIOV
|
||||||
# "sriovnet1" and tunnel_interface used here as placeholders
|
|
||||||
# This template should be modified for specific environments
|
# This template should be modified for specific environments
|
||||||
# See Official OpenStack SRIOV documentation for all available options
|
# See Official OpenStack SRIOV documentation for all available options
|
||||||
physical_device_mappings = sriovnet1:{{ tunnel_interface }}
|
physical_device_mappings = {{ neutron_sriov_physnets }}
|
||||||
exclude_devices =
|
exclude_devices =
|
||||||
|
|
||||||
[securitygroup]
|
[securitygroup]
|
||||||
|
@ -431,3 +431,9 @@ nova_source_version: "{{ kolla_source_version }}"
|
|||||||
###################################
|
###################################
|
||||||
|
|
||||||
enable_shared_var_lib_nova_mnt: "{{ enable_cinder_backend_nfs | bool or enable_cinder_backend_quobyte | bool }}"
|
enable_shared_var_lib_nova_mnt: "{{ enable_cinder_backend_nfs | bool or enable_cinder_backend_quobyte | bool }}"
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# PCI passthrough whitelist
|
||||||
|
###################################
|
||||||
|
|
||||||
|
nova_pci_passthrough_whitelist: "{{ enable_neutron_sriov | bool | ternary(neutron_sriov_physnet_mappings | dict2items(key_name='physical_network', value_name='devname'), []) }}"
|
||||||
|
@ -244,3 +244,8 @@ disable_group_policy_check_upcall = true
|
|||||||
# info updates to the scheduler, so just disable it.
|
# info updates to the scheduler, so just disable it.
|
||||||
track_instance_changes = false
|
track_instance_changes = false
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if nova_pci_passthrough_whitelist %}
|
||||||
|
[pci]
|
||||||
|
passthrough_whitelist = {{ nova_pci_passthrough_whitelist | to_json }}
|
||||||
|
{% endif %}
|
||||||
|
@ -14,37 +14,41 @@ SRIOV requires specific NIC and BIOS configuration and is not supported on all
|
|||||||
platforms. Consult NIC and platform specific documentation for instructions
|
platforms. Consult NIC and platform specific documentation for instructions
|
||||||
on enablement.
|
on enablement.
|
||||||
|
|
||||||
Modify the ``/etc/kolla/globals.yml`` file as the following example shows:
|
Modify the ``/etc/kolla/globals.yml`` file as the following example
|
||||||
|
shows which automatically appends ``sriovnicswitch`` to the
|
||||||
|
``mechanism_drivers`` inside ``ml2_conf.ini``.
|
||||||
|
|
||||||
|
.. path /etc/kolla/globals.yml
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
enable_neutron_sriov: "yes"
|
enable_neutron_sriov: "yes"
|
||||||
|
|
||||||
Modify the ``/etc/kolla/config/neutron/ml2_conf.ini`` file and add
|
It is also a requirement to define physnet:interface mappings for all
|
||||||
``sriovnicswitch`` to the ``mechanism_drivers``. Also, the provider
|
SRIOV devices as shown in the following example where ``sriovtenant1`` is the
|
||||||
networks used by SRIOV should be configured. Both flat and VLAN are configured
|
physnet mapped to ``ens785f0`` interface:
|
||||||
with the same physical network name in this example:
|
|
||||||
|
.. path /etc/kolla/globals.yml
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
neutron_sriov_physnet_mappings:
|
||||||
|
sriovtenant1: ens785f0
|
||||||
|
|
||||||
|
However, the provider networks using SRIOV should be configured.
|
||||||
|
Both flat and VLAN are configured with the same physical network name
|
||||||
|
in this example:
|
||||||
|
|
||||||
.. path /etc/kolla/config/neutron/ml2_conf.ini
|
.. path /etc/kolla/config/neutron/ml2_conf.ini
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[ml2]
|
|
||||||
mechanism_drivers = openvswitch,l2population,sriovnicswitch
|
|
||||||
|
|
||||||
[ml2_type_vlan]
|
[ml2_type_vlan]
|
||||||
network_vlan_ranges = sriovtenant1:1000:1009
|
network_vlan_ranges = sriovtenant1:1000:1009
|
||||||
|
|
||||||
[ml2_type_flat]
|
[ml2_type_flat]
|
||||||
flat_networks = sriovtenant1
|
flat_networks = sriovtenant1
|
||||||
|
|
||||||
Add ``PciPassthroughFilter`` to enabled_filters
|
Modify the ``nova.conf`` file and add ``PciPassthroughFilter`` to
|
||||||
|
``enabled_filters``. This filter is required by the Nova Scheduler
|
||||||
The ``PciPassthroughFilter``, which is required by Nova Scheduler service
|
service on the controller node.
|
||||||
on the Controller, should be added to ``enabled_filters``
|
|
||||||
|
|
||||||
Modify the ``/etc/kolla/config/nova.conf`` file and add
|
|
||||||
``PciPassthroughFilter`` to ``enabled_filters``. this filter is
|
|
||||||
required by The Nova Scheduler service on the controller node.
|
|
||||||
|
|
||||||
.. path /etc/kolla/config/nova.conf
|
.. path /etc/kolla/config/nova.conf
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
@ -53,24 +57,18 @@ required by The Nova Scheduler service on the controller node.
|
|||||||
enabled_filters = <existing filters>, PciPassthroughFilter
|
enabled_filters = <existing filters>, PciPassthroughFilter
|
||||||
available_filters = nova.scheduler.filters.all_filters
|
available_filters = nova.scheduler.filters.all_filters
|
||||||
|
|
||||||
Edit the ``/etc/kolla/config/nova.conf`` file and add PCI device whitelisting.
|
PCI devices listed under ``neutron_sriov_physnet_mappings`` will be
|
||||||
this is needed by OpenStack Compute service(s) on the Compute.
|
whitelisted on the Compute hosts inside ``nova.conf``.
|
||||||
|
|
||||||
.. path /etc/kolla/config/nova.conf
|
Physical network to interface mappings in ``neutron_sriov_physnet_mappings``
|
||||||
.. code-block:: ini
|
will be automatically added to ``sriov_agent.ini``. Specific VFs can be
|
||||||
|
excluded via ``excluded_devices``. However, leaving blank (default) leaves all
|
||||||
[pci]
|
VFs enabled:
|
||||||
passthrough_whitelist = [{"devname": "ens785f0", "physical_network": "sriovtenant1"}]
|
|
||||||
|
|
||||||
Modify the ``/etc/kolla/config/neutron/sriov_agent.ini`` file. Add physical
|
|
||||||
network to interface mapping. Specific VFs can also be excluded here. Leaving
|
|
||||||
blank means to enable all VFs for the interface:
|
|
||||||
|
|
||||||
.. path /etc/kolla/config/neutron/sriov_agent.ini
|
.. path /etc/kolla/config/neutron/sriov_agent.ini
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[sriov_nic]
|
[sriov_nic]
|
||||||
physical_device_mappings = sriovtenant1:ens785f0
|
|
||||||
exclude_devices =
|
exclude_devices =
|
||||||
|
|
||||||
Run deployment.
|
Run deployment.
|
||||||
|
Loading…
Reference in New Issue
Block a user