br-tun无法创建GRE接口

来源:互联网 发布:linux 复制 粘贴 命令 编辑:程序博客网 时间:2024/04/28 02:08

症状:VM启动ok,web界面显示有ip,但是vnc进去显示无ip,手动设置ip后也ping不通


排查,查看:

ovs-ofctl show br-tun
发现bt-tun上面没有GRE隧道的接口


然后日志中:
ERROR neutron.agent.linux.ovs_lib [-] Unable to execute ['ovs-ofctl', 'add-flow', 'br-tun', 'hard_timeout=0,idle_timeout=0,priority=1,in_port=-1,actions=resubmit(,2)']. Exception:
Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-ofctl', 'add-flow', 'br-tun', 'hard_timeout=0,idle_timeout=0,priority=1,in_port=-1,actions=resubmit(,2)']
Exit code: 1
Stdout: ''
Stderr: 'ovs-ofctl: -1: negative values not supported for in_port\n'

于是google之,有个对应bug:
https://bugs.launchpad.net/neutron/+bug/1238445


有提到安装:
sudo apt-get install openvswitch-datapath-dkms


最后按照这个解决

https://ask.openstack.org/en/question/6598/gre-tunnels-not-being-created/


其实就是

sudo apt-get install openvswitch-datapath-dkms

然后reboot,之后就OK了。


要么按照bug/1238445中最后提到的bug fix的步骤改改代码:

https://github.com/openstack/neutron/commit/edddad586332335578477df464be13f5a2b4a45f