@Slawek - I was able to reproduce this behavior in Devstack (Master) configured for DVR. For your convenience, I have provided the output from "stock" devstack (legacy routers) and DVR-enabled devstack (dvr_snat).
NOTE: This seems to impact 'vlan' networks, NOT 'flat' networks, in a DVR scenario.
@Slawek - I was able to reproduce this behavior in Devstack (Master) configured for DVR. For your convenience, I have provided the output from "stock" devstack (legacy routers) and DVR-enabled devstack (dvr_snat).
NOTE: This seems to impact 'vlan' networks, NOT 'flat' networks, in a DVR scenario.
-=-=-=-=-=-
== STOCK ==
local.conf:
[[local|localrc]] password PASSWORD= password PASSWORD= password PASSWORD= password NETWORK_ TYPE=vxlan
ADMIN_PASSWORD=
DATABASE_
RABBIT_
SERVICE_
Q_PLUGIN=ml2
Q_ML2_TENANT_
disable_service horizon cinder swift
DevStack Version: ussuri 9c88b4f195bb688 137b28c0c5 Merge "Remove fixup_virtualenv" 2020-04-09 16:00:35 +0000
Change: 01826e1c5b65e8d
OS Version: CentOS 7.7.1908 Core
2020-04-11 22:23:12.009 | stack.sh completed in 1034 seconds.
[jdenton@localhost devstack]$
[jdenton@localhost ~]$ cat /etc/neutron/ l3_agent. ini | grep agent_mode
#agent_mode = legacy
[jdenton@localhost devstack]$ sudo ovs-ofctl dump-flows br-ex 0x511d1a5fb4dc2 c8, duration=213.398s, table=0, n_packets=31, n_bytes=2098, priority= 4,in_port= "phy-br- ex",dl_ vlan=2 actions= strip_vlan, NORMAL 0x511d1a5fb4dc2 c8, duration=248.562s, table=0, n_packets=41, n_bytes=3810, priority= 2,in_port= "phy-br- ex" actions=drop 0x511d1a5fb4dc2 c8, duration=248.580s, table=0, n_packets=12, n_bytes=1272, priority=0 actions=NORMAL
cookie=
cookie=
cookie=
source openrc admin admin network- type vlan --provider- physical- network public --provider-segment 1000 vlan1000
openstack network create --provider-
openstack subnet create --subnet-range 192.168.77.0/24 --network vlan1000 subnet1000
[jdenton@localhost devstack]$ sudo ovs-ofctl dump-flows br-ex 0x511d1a5fb4dc2 c8, duration=250.059s, table=0, n_packets=31, n_bytes=2098, priority= 4,in_port= "phy-br- ex",dl_ vlan=2 actions= strip_vlan, NORMAL 0x511d1a5fb4dc2 c8, duration=1.864s, table=0, n_packets=2, n_bytes=180, priority= 4,in_port= "phy-br- ex",dl_ vlan=4 actions= mod_vlan_ vid:1000, NORMAL 0x511d1a5fb4dc2 c8, duration=285.223s, table=0, n_packets=45, n_bytes=4194, priority= 2,in_port= "phy-br- ex" actions=drop 0x511d1a5fb4dc2 c8, duration=285.241s, table=0, n_packets=12, n_bytes=1272, priority=0 actions=NORMAL
cookie=
cookie=
cookie=
cookie=
>> Simulate disconnect by restarting OVS:
sudo systemctl restart openvswitch
[jdenton@localhost devstack]$ sudo ovs-ofctl dump-flows br-ex 0x4957ef95c1821 8f4, duration=4.505s, table=0, n_packets=0, n_bytes=0, priority= 4,in_port= "phy-br- ex",dl_ vlan=4 actions= mod_vlan_ vid:1000, NORMAL 0x4957ef95c1821 8f4, duration=4.477s, table=0, n_packets=0, n_bytes=0, priority= 4,in_port= "phy-br- ex",dl_ vlan=2 actions= strip_vlan, NORMAL 0x4957ef95c1821 8f4, duration=4.545s, table=0, n_packets=0, n_bytes=0, priority= 2,in_port= "phy-br- ex" actions=drop 0x4957ef95c1821 8f4, duration=4.550s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL
cookie=
cookie=
cookie=
cookie=
>> Everything looks OK.
-=-=-=-=-=-=-
== DVR ==
local.conf:
[[local|localrc]] password PASSWORD= password PASSWORD= password PASSWORD= password NETWORK_ TYPE=vxlan
ADMIN_PASSWORD=
DATABASE_
RABBIT_
SERVICE_
Q_PLUGIN=ml2
Q_ML2_TENANT_
Q_DVR_MODE=dvr_snat
disable_service horizon cinder swift
DevStack Version: ussuri 9c88b4f195bb688 137b28c0c5 Merge "Remove fixup_virtualenv" 2020-04-09 16:00:35 +0000
Change: 01826e1c5b65e8d
OS Version: CentOS 7.6.1810 Core
2020-04-11 22:51:07.324 | stack.sh completed in 1088 seconds.
[jdenton@localhost devstack]$ cat /etc/neutron/ l3_agent. ini | grep agent_mode
agent_mode = dvr_snat
#agent_mode = legacy
[jdenton@localhost devstack]$ sudo ovs-ofctl dump-flows br-ex 0x9e09489cfebc5 585, duration=278.338s, table=0, n_packets=25, n_bytes=1774, priority= 4,in_port= "phy-br- ex",dl_ vlan=2 actions= strip_vlan, NORMAL 0x9e09489cfebc5 585, duration=317.281s, table=0, n_packets=77, n_bytes=7066, priority= 2,in_port= "phy-br- ex" actions= resubmit( ,1) 0x9e09489cfebc5 585, duration=317.604s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL 0x9e09489cfebc5 585, duration=317.278s, table=0, n_packets=14, n_bytes=1412, priority=1 actions= resubmit( ,3) 0x9e09489cfebc5 585, duration=317.277s, table=1, n_packets=77, n_bytes=7066, priority=0 actions= resubmit( ,2) 0x9e09489cfebc5 585, duration=317.275s, table=2, n_packets=77, n_bytes=7066, priority= 2,in_port= "phy-br- ex" actions=drop 0x9e09489cfebc5 585, duration=317.274s, table=3, n_packets=14, n_bytes=1412, priority=1 actions=NORMAL
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
>> Unlike legacy mode, we do not have a 'drop' flow in Table 0 from the get-go. That seems to move to table 2 in this scenario.
source openrc admin admin network- type vlan --provider- physical- network public --provider-segment 1000 vlan1000
openstack network create --provider-
openstack subnet create --subnet-range 192.168.77.0/24 --network vlan1000 subnet1000
[jdenton@localhost devstack]$ sudo ovs-ofctl dump-flows br-ex 0x9e09489cfebc5 585, duration=313.117s, table=0, n_packets=25, n_bytes=1774, priority= 4,in_port= "phy-br- ex",dl_ vlan=2 actions= strip_vlan, NORMAL 0x9e09489cfebc5 585, duration=352.060s, table=0, n_packets=81, n_bytes=7422, priority= 2,in_port= "phy-br- ex" actions= resubmit( ,1) 0x9e09489cfebc5 585, duration=352.383s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL 0x9e09489cfebc5 585, duration=352.057s, table=0, n_packets=14, n_bytes=1412, priority=1 actions= resubmit( ,3) 0x9e09489cfebc5 585, duration=352.056s, table=1, n_packets=81, n_bytes=7422, priority=0 actions= resubmit( ,2) 0x9e09489cfebc5 585, duration=0.586s, table=2, n_packets=1, n_bytes=90, priority= 4,in_port= "phy-br- ex",dl_ vlan=4 actions= mod_vlan_ vid:1000, NORMAL 0x9e09489cfebc5 585, duration=352.054s, table=2, n_packets=80, n_bytes=7332, priority= 2,in_port= "phy-br- ex" actions=drop 0x9e09489cfebc5 585, duration=352.053s, table=3, n_packets=14, n_bytes=1412, priority=1 actions=NORMAL
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
>> Simulate disconnect by restarting OVS:
sudo systemctl restart openvswitch
[jdenton@localhost devstack]$ sudo ovs-ofctl dump-flows br-ex 0x7390a2b2dfa57 b5, duration=3.487s, table=0, n_packets=0, n_bytes=0, priority= 4,in_port= "phy-br- ex",dl_ vlan=2 actions= strip_vlan, NORMAL 0x7390a2b2dfa57 b5, duration=3.835s, table=0, n_packets=0, n_bytes=0, priority= 2,in_port= "phy-br- ex" actions=drop 0x9e09489cfebc5 585, duration=4.078s, table=0, n_packets=0, n_bytes=0, priority=1 actions= resubmit( ,3) 0x7390a2b2dfa57 b5, duration=3.838s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL 0x9e09489cfebc5 585, duration=4.077s, table=1, n_packets=0, n_bytes=0, priority=0 actions= resubmit( ,2) 0x7390a2b2dfa57 b5, duration=3.584s, table=2, n_packets=0, n_bytes=0, priority= 4,in_port= "phy-br- ex",dl_ vlan=4 actions= mod_vlan_ vid:1000, NORMAL 0x9e09489cfebc5 585, duration=4.076s, table=2, n_packets=0, n_bytes=0, priority= 2,in_port= "phy-br- ex" actions=drop 0x9e09489cfebc5 585, duration=4.075s, table=3, n_packets=0, n_bytes=0, priority=1 actions=NORMAL
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
cookie=
>> Notice the drop flow in Table 0 now. We also lose the 'resubmit(,1)' flow. Not to mention, some flows have the old cookie.