Mellanox-Neutron-Icehouse-Ubuntu-以太网
概述
此 wiki 页面描述了如何在 Ubuntu 12.04 服务器上调整 Mellanox OpenStack
先决条件
- 一个运行的 OpenStack 环境,安装了基于 OVS 之上的 ML2 插件。
- 所有节点都配备了 Mellanox ConnectX®-3 网络适配器 (http://www.mellanox.com/page/products_dyn?product_family=119)
- 所有节点上都安装了 Mellanox OFED 2.2 或更高版本。请参阅 Mellanox 网站获取最新的 OFED:http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers
- 所有计算节点上都启用了 SR-IOV。有关更多信息,请参阅 Mellanox 社区 点击此处。
- 软件包 iproute2 - (http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 ) 安装在所有计算节点上
- 交换机端口上配置了 VLAN。
以太网网络
控制器节点
在 /etc/nova/nova.conf 中,确保您有以下行
security_group_api=nova
如果更改了该值,请重新启动 Nova 服务
# for i in $(initctl list | grep '^nova' | awk '{print $1}'); do service $i restart; done
Neutron 服务器节点
注意:Neutron 服务器有时可以作为控制器节点的一部分。
要配置 Neutron-Server 节点
1. 编辑 /etc/neutron/neutron.conf,并确保 Neutron 正在使用 ML2 插件
[DEFAULT] core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
2. 修改 ML2 配置文件 (/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=<physical_network>:<min_vlan>:<max_vlan> //(i.e. default:2:10) [securitygroup] enable_security_group = True [eswitch] vnic_type = hostdev apply_profile_patch = True
3. 安装 Mellanox Neutron 插件所需的 Deb 包(来自 Ubuntu 的仓库)
apt-get install neutron-plugin-mlnx-agent
4. 编辑 /etc/neutron/plugins/mlnx/mlnx_conf.ini 以匹配您的环境
[mlnx] network_vlan_ranges = <physical_network>:<min_vlan:<max_vlan> //(i.e. default:2:10) tenant_network_type = vlan [eswitch] physical_interface_mappings = <physical_network>:<eth interface> //(i.e. default:eth0) vnic_type = hostdev [agent] support_old_agents = True
5. 重新启动 neutron-server
/etc/init.d/neutron-server start
计算节点
要配置计算节点
1. 从以下链接下载 mlnxvif 和 eSwitch Daemon (eSwitchd)
http://www.mellanox.com/downloads/solutions/openstack/icehouse/debian/
2. 安装 Mellanox 插件服务 mlnxvif 和 eSwitchd
dpkg –i python-mlnxvif_2014.1.1-1_all.deb dpkg –i python-eswitchd_0.10-1_all.deb
3. 编辑 /etc/eswitchd/eswitchd.conf 如下
[DAEMON] fabrics=<physical_network>:<eth-interface> //(i.e. default:eth0)
4. 编辑 /etc/nova/nova.conf 如下
[DEFAULT] compute_driver = libvirt.LibvirtDriver libvirt_vif_driver = mlnxvif.vif.MlxEthVIFDriver security_group_api = nova
5. 检查 “ebrctl” 是否出现在 Nova 的 rootwrap 文件之一中
grep 'ebrctl' /etc/nova/rootwrap.d/*
如果 “ebrctl” 未出现在 Nova 的 rootwrap 文件之一中,请编辑文件 /etc/nova/rootwrap.d/compute.filters 如下
[Filters] ebrctl: CommandFilter, ebrctl, root
6. 安装 Neutron Mellanox 代理(来自 Ubuntu 仓库)
apt-get install neutron-plugin-mlnx-agent
7. 将 /etc/neutron/plugins/mlnx/mlnx_conf.ini 从 Neutron 服务器节点复制到每个计算节点上的相同路径。8. 重新启动以下服务
/etc/init.d/nova-compute restart /etc/init.d/eswitchd start /etc/init.d/neutron-plugin-mlnx-agent start
网络节点
要配置网络节点
1. 配置 eIPoIB(用于 Linux bridge 插件),并编辑文件 /etc/infiniband/openib.conf 如下
E_IPOIB_LOAD=yes
2. 编辑 /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini 如下
physical_interface_mappings = <physical_network>:<eth-interface> //(i.e. default:eth2)
3. 重新启动 Open vSwitch 代理
service neutron-openvswitch-agent restart
4. 将 /etc/neutron/neutron.conf 从计算节点复制到网络节点上的相同路径。
5. 编辑 /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini 如下
physical_interface_mappings = <physical_network>:<eth interface> //(i.e. default:eth2)
6. 编辑 /etc/neutron/dhcp_agent.ini 和 /etc/neutron/l3_agent.ini 如下
[DEFAULT] interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
7. 重新启动以下服务
service neutron-plugin-linuxbridge-agent restart service neutron-dhcp-agent restart service neutron-l3-agent restart
故障排除
- 如果您在插件的日志中看到请求超时错误,请确保已启动 eswitchd 服务,并尝试增加插件配置文件中的 request_timeout 值。