跳转到: 导航, 搜索

Mellanox-Neutron-Icehouse-Redhat-Ethernet


概述

Mellanox Neutron ML2 驱动程序

Mellanox ML2 机制驱动程序实现了 ML2 插件机制驱动程序 API。

该驱动程序支持 Mellanox 嵌入式交换机功能,作为 VPI(以太网/InfiniBand)HCA 的一部分。Mellanox ML2 机制驱动程序提供与 Mellanox Neutron 插件功能上的对等性。

Mellanox ML2 机制驱动程序支持 DIRECT(PCI 直通)和 MACVTAP(具有类似 tap 软件接口的虚拟接口)vnic 类型。有关 vnic 类型配置 API 详情,请参阅配置参考指南(点击 此处)。映射到客户机 VM 的硬件 vNIC 允许更高的性能和高级功能,例如 RDMA(远程直接内存访问)。

该驱动程序支持 VLAN 网络类型,以促进以太网或 InfiniBand 架构上的虚拟网络。

• Mellanox OpenStack Neutron Agent (L2 Agent) 在每个计算节点上运行。

• Agent 应该根据 VIF(VM vNIC)和嵌入式交换机端口之间的映射应用 VIF 连接性。

Mellanox Neutron 插件

请注意,Mellanox 插件在 Icehouse 版本中已被弃用,并且在 Juno 版本中将不再支持。该插件中的功能现在以 Mellanox 机制驱动程序的形式包含在 ML2 插件中。

有关 Mellanox Neutron 插件的详细信息,请参阅 https://wiki.openstack.org/wiki/Mellanox-Neutron-Havana-Redhat

Mellanox Nova VIF 驱动程序

在使用 Mellanox 机制驱动程序时,应使用 Mellanox Nova VIF 驱动程序。VIF 驱动程序通过将类型为 DIRECT 的 vNIC 绑定到嵌入式交换机端口来支持 VIF 插件。用于 MACVTAP 类型的 VIF 驱动程序包含在 Nova libvirt 通用 vif 驱动程序中。对于 SR-IOV 直通(vnic 类型 DIRECT),需要使用 Mellanox git 仓库或 RPM 中的 VIF 驱动程序。

先决条件

以太网网络

Neutron 服务器节点

1. 确保 ML2 插件是当前的 Neutron 插件,方法是检查 /etc/neutron/neutron.conf 中的 core_plugin 选项

core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin

2. 确保 /etc/neutron/plugin.ini 指向(符号链接)/etc/neutron/plugins/ml2/ml2_conf.ini

3. 修改 /etc/neutron/plugins/ml2/ml2_conf.ini 并包含以下内容

[ml2]

type_drivers = vlan,flat
tenant_network_types = vlan
mechanism_drivers = openvswitch,mlnx
[ml2_type_vlan]
network_vlan_ranges = default:2:100
[eswitch]
vnic_type = hostdev
apply_profile_patch = True

4. 启动(或重新启动)Neutron 服务器

   #service neutron-server restart

计算节点

要配置计算节点

1. 下载以下 Mellanox OpenStack 仓库文件

   #wget http://www.mellanox.com/downloads/solutions/openstack/icehouse/repo/mlnx-icehouse/mlnx-icehouse.repo -O /etc/yum.repos.d/mlnx-icehouse.repo

2. 安装 eSwitch Daemon (eSwitchd) RPM

  #yum install eswitchd

3. 安装 Mellanox VIF 驱动程序

   #yum install mlnxvif

4. 安装 Neutron agent 所需的 RPM

   #yum install openstack-neutron-mellanox

5. 配置 /etc/eSwitchd/eSwitchd.conf 中的 eSwitch fabrics 参数

   fabrics='<network name as in ml2>:<interface>'

6. 在 /etc/nova/nova.conf 中,检查计算驱动程序是否为 libvirt

   [libvirt]
   vif_driver=mlnxvif.vif.MlxEthVIFDriver

7. 修改 /etc/neutron/plugins/mlnx/mlnx_conf.ini 文件以反映您的环境

   [AGENT]
   polling_interval - Polling interval (in seconds)for existing vNICs. The default is 2 seconds.
   rpc_support_old_agents - must be set to 'True'
   [ESWITCH]
   physical_interface_mapping - the network_interface_mappings maps each physical network name to the physical interface (on top of Mellanox Adapter) connecting the node to that 
   physical network. The format of this paramter is:  
   <fabric name>:< PF name> (Only relevant on Compute node). PF Name can either be the PF (Physical Function) Name or 'autoeth' for automatic Ethernet configuration,'autoib' for  
   automatic InfiniBand configuration. The default is "default:autoeth".  

8. 重启 Nova 

   service openstack-nova-compute restart

9. 启动 eSwitch Daemon (eSwitchd)

   service eswitchd start

10. 启动 Neutron agent

   #service neutron-mlnx-agent start

注意:在 Neutron 之前,eSwitch Daemon 应该正在运行

网络节点

要配置网络节点

1. 更改位于 /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini 的 ini 文件的配置。以下示例中的“default”是根据 /etc/neutron/plugins/ml2/ml2_conf.ini 中配置的物理网络的名称。

   bridge_mappings = default:br-eth3,public:br-ex

2. 更新 DHCP 服务器中的 /etc/neutron/dhcp_agent.ini

   interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver

有关更多信息,请参考以下链接: https://docs.openstack.org/trunk/openstack-network/admin/content/adv_cfg_dhcp_agent.html

3. 启动 DHCP 服务器

   #service neutron-openvswitch-agent start
   #service neutron-dhcp-agent start

4. 配置 L3 agent 配置文件 (/etc/neutron/l3_agent.ini)

   #gateway_external_network_id = d4fdfebb-e027-4acd-bed4-1d96e896f336
     router_id = 41bf1aa0-3daf-4f51-9d23-0a4b15020c36
     interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
     external_network_bridge = br-ex

注意:以上是为租户配置一个路由器的示例。您的 gateway_external_network_id、router_id 和 external_network_bridge 的值可能不同。

5. 启动 L3 agent

   #service neutron-l3-agent restart

已知问题和故障排除

有关已知问题和故障排除选项,请参阅 Mellanox OpenStack 故障排除

参考文献

1. http://www.mellanox.com/openstack/

2. 源代码仓库

3. Mellanox OFED

4. Mellanox OpenStack 解决方案参考架构

5. Mellanox OpenStack 故障排除

有关更多详细信息,请将您的问题发送至 openstack@mellanox.com

返回到 Mellanox-OpenStack wiki 页面。