首先说明我们的控制节点和网络节点是安装在一起的
1,确保openvswitch-switch正常按照并启动,尤其是ovs-brcompatd
root@cloud :~# service openvswitch-switch status
ovsdb-server is running with pid 56266ovs-vswitchd is running with pid 56275ovs-brcompatd is running with pid 56359
2,如果ovs-brcompatd is not running,可以参考来解决。
3,确保dnsmasq正常启动,如果service dnsmasq start后再用ps -aux|grep dnsmasq,看到的不是如下的输出,那么可能是没有安装dnsmasq(apt-get install dns-masq):
root@cloud:~# ps -aux|grep dnsmasq warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ dnsmasq 1987 0.0 0.0 28900 924 ? S 11:36 0:00 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new nobody 27208 0.0 0.0 28900 976 ? S 11:46 0:00 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tapf6c204da-20 --except-interface=lo --pid-file=/var/lib/quantum/dhcp/c34ed4e4-6b31-4669-badc-93bb68f17a10/pid --dhcp-hostsfile=/var/lib/quantum/dhcp/c34ed4e4-6b31-4669-badc-93bb68f17a10/host --dhcp-optsfile=/var/lib/quantum/dhcp/c34ed4e4-6b31-4669-badc-93bb68f17a10/opts --dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update --leasefile-ro --dhcp-range=set:tag0,172.17.17.0,static,120s --conf-file= --domain=openstacklocal root 27209 0.0 0.0 28900 480 ? S 11:46 0:00 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tapf6c204da-20 --except-interface=lo --pid-file=/var/lib/quantum/dhcp/c34ed4e4-6b31-4669-badc-93bb68f17a10/pid --dhcp-hostsfile=/var/lib/quantum/dhcp/c34ed4e4-6b31-4669-badc-93bb68f17a10/host --dhcp-optsfile=/var/lib/quantum/dhcp/c34ed4e4-6b31-4669-badc-93bb68f17a10/opts --dhcp-script=/usr/bin/quantum-dhcp-agent-dnsmasq-lease-update --leasefile-ro --dhcp-range=set:tag0,172.17.17.0,static,120s --conf-file= --domain=openstacklocal root 76345 0.0 0.0 9412 888 pts/0 S+ 12:01 0:00 grep --color=auto dnsmasq
4,网络服务的启动最好不使用 service XXX restart 这种方式来启动,因为可能看不到错误信息,我是这样启动的,
sudo neutron-server --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini --config-file /etc/neutron/neutron.conf
sudo neutron-openvswitch-agent --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini --config-file /etc/neutron/neutron.conf
sudo neutron-dhcp-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini
sudo neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini
确保他们都正常未报错。
5,gre模式的情况下网络节点需要3张网卡!eth0做内部节点的管理网络,同时做VM的gre网络通道,eth1作为虚拟机使用浮动IP时的出口,eth3作为网络节点自己连接外网的接口。
6,把控制节点和计算节点的/etc/nova/nova.conf里的
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
改成:
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchVirtualPortDriver
附图:
参考资料: