Merge "Add support for Neutron Multi interface driver"

This commit is contained in:
Zuul 2019-10-04 03:39:18 +00:00 committed by Gerrit Code Review
commit 8adf6392a0
7 changed files with 147 additions and 2 deletions

View File

@ -0,0 +1,121 @@
heat_template_version: rocky
description: >
OpenStack Neutron MLNX IB config service
parameters:
ContainerNeutronConfigImage:
description: The container image to use for the neutron config_volume
type: string
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
MultiInterfaceDriverMappings:
type: comma_delimited_list
default: ""
tags:
- role_specific
IPoIBPhysicalInterface:
type: string
default: 'ib0'
tags:
- role_specific
resources:
ContainersCommon:
type: ../containers-common.yaml
NeutronBase:
type: ./neutron-plugin-ml2.yaml
properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- neutron::agents::ml2::mlnx::multi_interface_driver_mappings: MultiInterfaceDriverMappings
neutron::agents::ml2::mlnx::ipoib_physical_interface : IPoIBPhysicalInterface
- values: {get_param: [RoleParameters]}
- values:
MultiInterfaceDriverMappings: {get_param: MultiInterfaceDriverMappings}
IPoIBPhysicalInterface: {get_param: IPoIBPhysicalInterface}
outputs:
role_data:
description: Role data for Neutron agents IB config
value:
service_name: neutron_agents_ib_config
config_settings:
map_merge:
- get_attr: [NeutronBase, role_data, config_settings]
- get_attr: [RoleParametersValue, value]
- neutron::agents::ml2::mlnx::enabled: False
neutron::agents::ml2::mlnx::manage_service: False
neutron::agents::ml2::mlnx::manage_package: False
neutron::agents::ml2::mlnx::dhcp_broadcast_reply: true
neutron::agents::ml2::mlnx::interface_driver : 'multi'
neutron::agents::ml2::mlnx::enable_multi_interface_driver_cache_maintenance : true
docker_config:
step_3:
neutron_agents_ib_config:
detach: false
image: {get_param: ContainerNeutronConfigImage}
net: host
pid: host
user: root
privileged: true
security_opt: 'label=disable'
command:
- puppet
- apply
- --modulepath
- /etc/puppet/modules:/usr/share/openstack-puppet/modules
- -v
- -e
- "include neutron::agents::ml2::mlnx"
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /lib/modules:/lib/modules:ro
- /usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro
- /var/lib/config-data/puppet-generated/neutron/etc/neutron:/etc/neutron
- ''
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
metadata_settings:
get_attr: [NeutronBase, role_data, metadata_settings]
upgrade_tasks: []

View File

@ -48,6 +48,16 @@ parameters:
description: SDN server domain
type: string
default: 'cloudx'
MultiInterfaceEnabled:
type: boolean
default: false
BindNormalPortsPhysnet:
type: string
default: 'datacentre'
conditions:
multi_interface_enabled: {equals: [{get_param: MultiInterfaceEnabled}, true]}
resources:
@ -73,6 +83,12 @@ outputs:
neutron::plugins::ml2::mellanox::mlnx_sdn_assist::sdn_password: {get_param: MlnxSDNPassword}
neutron::plugins::ml2::mellanox::mlnx_sdn_assist::sdn_url: {get_param: MlnxSDNUrl}
neutron::plugins::ml2::mellanox::mlnx_sdn_assist::sdn_domain: {get_param: MlnxSDNDomain}
-
if:
- multi_interface_enabled
- neutron::plugins::ml2::mellanox::mlnx_sdn_assist::bind_normal_ports: {get_param: MultiInterfaceEnabled}
neutron::plugins::ml2::mellanox::mlnx_sdn_assist::bind_normal_ports_physnets: {get_param: BindNormalPortsPhysnet}
- {}
service_config_settings: {}
# BEGIN DOCKER SETTINGS
puppet_config:

View File

@ -1,14 +1,18 @@
# A Heat environment that can be used to enable MLNX agent in neutron.
resource_registry:
OS::TripleO::Services::NeutronMlnxAgent: ../../deployment/neutron/neutron-mlnx-agent-container-puppet.yaml
OS::TripleO::Services::NeutronAgentsIBConfig: ../../deployment/neutron/neutron-agents-ib-config-container-puppet.yaml
parameter_defaults:
NeutronMechanismDrivers: ['mlnx_infiniband','openvswitch']
NeutronMechanismDrivers: ['mlnx_sdn_assist','mlnx_infiniband']
NeutronPhysicalDevMappings: ['datacentre:ib0']
NovaSchedulerDefaultFilters: ['RetryFilter','AvailabilityZoneFilter','ComputeFilter','ComputeCapabilitiesFilter','ImagePropertiesFilter','ServerGroupAntiAffinityFilter','ServerGroupAffinityFilter','PciPassthroughFilter', 'NUMATopologyFilter']
NovaSchedulerAvailableFilters: ["nova.scheduler.filters.all_filters","nova.scheduler.filters.pci_passthrough_filter.PciPassthroughFilter"]
MultiInterfaceEnabled: true
BindNormalPortsPhysnet: 'datacentre'
MultiInterfaceDriverMappings: ['datacentre:ipoib']
IPoIBPhysicalInterface: 'ib0'
NovaPCIPassthrough:
- devname: "ib0"
physical_network: datacentre

View File

@ -174,6 +174,7 @@ resource_registry:
OS::TripleO::Services::NeutronSriovAgent: OS::Heat::None
OS::TripleO::Services::NeutronSriovHostConfig: OS::Heat::None
OS::TripleO::Services::NeutronMlnxAgent: OS::Heat::None
OS::TripleO::Services::NeutronAgentsIBConfig: OS::Heat::None
OS::TripleO::Services::OsloMessagingRpc: deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::RabbitMQ: OS::Heat::None

View File

@ -139,6 +139,7 @@
- OS::TripleO::Services::NeutronML2FujitsuFossw
- OS::TripleO::Services::NeutronOvsAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NeutronAgentsIBConfig
- OS::TripleO::Services::NovaApi
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::NovaIronic

View File

@ -131,6 +131,7 @@
- OS::TripleO::Services::NeutronML2FujitsuFossw
- OS::TripleO::Services::NeutronOvsAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NeutronAgentsIBConfig
- OS::TripleO::Services::NovaApi
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::NovaIronic

View File

@ -142,6 +142,7 @@
- OS::TripleO::Services::NeutronML2FujitsuFossw
- OS::TripleO::Services::NeutronOvsAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NeutronAgentsIBConfig
- OS::TripleO::Services::NovaApi
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::NovaIronic