From fdb5c22bd9a390bf3f683ff9d98c6cee30ff7496 Mon Sep 17 00:00:00 2001 From: Hamdy Khader Date: Sun, 1 Sep 2019 10:34:46 +0300 Subject: [PATCH] Add support for Neutron Multi interface driver - configures Neutron agents (dhcp,l3) to include multi interface configurations - configures Neutron ML2 to bind normal ports Depends-On: I79a9bf7c07ca7c60e982a30b23308576daffc017 Change-Id: I212c0f4ae639023bdb75ced6a82a3a4aacf9d0f9 --- ...ron-agents-ib-config-container-puppet.yaml | 121 ++++++++++++++++++ ...-ml2-mlnx-sdn-assist-container-puppet.yaml | 16 +++ environments/services/neutron-mlnx-agent.yaml | 8 +- overcloud-resource-registry-puppet.j2.yaml | 1 + roles/Controller.yaml | 1 + roles/ControllerNoCeph.yaml | 1 + roles_data.yaml | 1 + 7 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 deployment/neutron/neutron-agents-ib-config-container-puppet.yaml diff --git a/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml b/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml new file mode 100644 index 0000000000..11a96dfb32 --- /dev/null +++ b/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml @@ -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: [] diff --git a/deployment/neutron/neutron-plugin-ml2-mlnx-sdn-assist-container-puppet.yaml b/deployment/neutron/neutron-plugin-ml2-mlnx-sdn-assist-container-puppet.yaml index ae11a15961..4eb3e78ac0 100644 --- a/deployment/neutron/neutron-plugin-ml2-mlnx-sdn-assist-container-puppet.yaml +++ b/deployment/neutron/neutron-plugin-ml2-mlnx-sdn-assist-container-puppet.yaml @@ -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: diff --git a/environments/services/neutron-mlnx-agent.yaml b/environments/services/neutron-mlnx-agent.yaml index f51a3c0db8..4bd21ce21e 100644 --- a/environments/services/neutron-mlnx-agent.yaml +++ b/environments/services/neutron-mlnx-agent.yaml @@ -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 diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index 59b8919b4a..e16318b640 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -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 diff --git a/roles/Controller.yaml b/roles/Controller.yaml index a55a9f7388..9e36581cf6 100644 --- a/roles/Controller.yaml +++ b/roles/Controller.yaml @@ -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 diff --git a/roles/ControllerNoCeph.yaml b/roles/ControllerNoCeph.yaml index 3481e3109d..d0c79ec4e6 100644 --- a/roles/ControllerNoCeph.yaml +++ b/roles/ControllerNoCeph.yaml @@ -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 diff --git a/roles_data.yaml b/roles_data.yaml index e82c225301..5b55a5bcf0 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -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