-
Bug
-
Resolution: Done-Errata
-
Normal
-
None
Description:
add_route doesn't work well in gateway router mode
affected version:
openvswitch3.2-3.2.0-32.el9fdp.x86_64
python3-openvswitch3.2-3.2.0-32.el9fdp.x86_64
ovn23.09-23.09.0-73.el9fdp.x86_64
ovn23.09-central-23.09.0-73.el9fdp.x86_64
ovn23.09-host-23.09.0-73.el9fdp.x86_64
reproducer:
systemctl start openvswitch systemctl start ovn-northd ovn-nbctl set-connection ptcp:6641 ovn-sbctl set-connection ptcp:6642 ovs-vsctl set open . external_ids:system-id=hv1 external_ids:ovn-remote=tcp:127.0.0.1:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=127.0.0.1 systemctl restart ovn-controller ovn-nbctl ls-add ls1 ovn-nbctl lsp-add ls1 vm1 -- lsp-set-addresses vm1 "00:00:00:00:01:05 192.168.100.5" ovn-nbctl ls-add ls2 ovn-nbctl lsp-add ls2 vm2 -- lsp-set-addresses vm2 "00:00:00:00:02:05 192.168.200.5" ovn-nbctl ls-add ls-pub ovn-nbctl lr-add lr1 ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:01:01 192.168.100.1/24 ovn-nbctl lsp-add ls1 ls1-lr1 \ -- lsp-set-type ls1-lr1 router \ -- lsp-set-addresses ls1-lr1 router \ -- lsp-set-options ls1-lr1 router-port=lr1-ls1 ovn-nbctl lr-add lr2 ovn-nbctl lrp-add lr2 lr2-ls2 00:00:00:00:02:01 192.168.200.1/24 ovn-nbctl lsp-add ls2 ls2-lr2 \ -- lsp-set-type ls2-lr2 router \ -- lsp-set-addresses ls2-lr2 router \ -- lsp-set-options ls2-lr2 router-port=lr2-ls2 ovn-nbctl lrp-add lr1 lr1-ls-pub 00:00:00:00:03:01 172.18.2.110/24 ovn-nbctl lsp-add ls-pub ls-pub-lr1 \ -- lsp-set-type ls-pub-lr1 router \ -- lsp-set-addresses ls-pub-lr1 router \ -- lsp-set-options ls-pub-lr1 router-port=lr1-ls-pub ovn-nbctl lrp-add lr2 lr2-ls-pub 00:00:00:00:03:02 172.18.1.173/24 ovn-nbctl lsp-add ls-pub ls-pub-lr2 \ -- lsp-set-type ls-pub-lr2 router \ -- lsp-set-addresses ls-pub-lr2 router \ -- lsp-set-options ls-pub-lr2 router-port=lr2-ls-pub ovn-nbctl set logical_router lr1 options:chassis=hv1 ovn-nbctl set logical_router lr2 options:chassis=hv1 ovn-nbctl --add-route lr-nat-add lr1 dnat_and_snat 172.18.2.11 192.168.100.5 vm1 00:00:00:00:03:01 ovn-nbctl --add-route lr-nat-add lr2 dnat_and_snat 172.18.2.12 192.168.200.5 vm2 00:00:00:00:03:02 ovs-vsctl add-port br-int vm1 -- set interface vm1 type=internal external_ids:iface-id=vm1 ip netns add vm1 ip link set vm1 netns vm1 ip netns exec vm1 ip link set vm1 address 00:00:00:00:01:05 ip netns exec vm1 ip link set vm1 up ip netns exec vm1 ip addr add 192.168.100.5/24 dev vm1 ip netns exec vm1 ip route add default via 192.168.100.1 ovs-vsctl add-port br-int vm2 -- set interface vm2 type=internal external_ids:iface-id=vm2 ip netns add vm2 ip link set vm2 netns vm2 ip netns exec vm2 ip link set vm2 address 00:00:00:00:02:05 ip netns exec vm2 ip link set vm2 up ip netns exec vm2 ip addr add 192.168.200.5/24 dev vm2 ip netns exec vm2 ip route add default via 192.168.200.1 ip netns exec vm1 ping 172.18.2.12 -c 1
actual result
ping failed
expected result:
ping passed
other information:
[root@wsfd-advnetlab18 add_route]# rpm -qa | grep -E "openvswitch|ovn"
openvswitch-selinux-extra-policy-1.0-34.el9fdp.noarch
openvswitch3.2-3.2.0-32.el9fdp.x86_64
python3-openvswitch3.2-3.2.0-32.el9fdp.x86_64
ovn23.09-23.09.0-73.el9fdp.x86_64
ovn23.09-central-23.09.0-73.el9fdp.x86_64
ovn23.09-host-23.09.0-73.el9fdp.x86_64
[root@wsfd-advnetlab18 add_route]# ip netns exec vm1 ping 172.18.2.12 -c 1
PING 172.18.2.12 (172.18.2.12) 56(84) bytes of data.
— 172.18.2.12 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
[root@wsfd-advnetlab18 add_route]# ovn-sbctl show
Chassis hv1
hostname: wsfd-advnetlab18.anl.eng.rdu2.dc.redhat.com
Encap geneve
ip: "127.0.0.1"
options: {csum="true"}
Port_Binding lr2-ls2
Port_Binding vm1
Port_Binding lr1-ls-pub
Port_Binding ls2-lr2
Port_Binding ls-pub-lr2
Port_Binding ls1-lr1
Port_Binding ls-pub-lr1
Port_Binding lr1-ls1
Port_Binding vm2
Port_Binding lr2-ls-pub
- clones
-
FDP-244 add_route doesn't work well in gateway router mode
- In Progress
- links to
-
RHBA-2024:130931 ovn24.03 bug fix and enhancement update