ovsfw: OVS br-int rule disappears from the table=60 after stop/start VM
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
High
|
Unassigned |
Bug Description
I found out that after VM creation and after VM stop/start the set of OVS rules is different in br-int table=60 (TRANSIENT_TABLE)
I have a flat network, in this network I create a VM. After the VM stop/start the set of rules in table 60 for this VM is different from the one that was after VM creation.
Here is a demo:
[root@devstack0 ~]# openstack server create test-vm --image cirros-
+------
| Field | Value |
+------
| id | 84c7ed9c-
+------
[root@devstack0 ~]# openstack port list --device-id 84c7ed9c-
+------
| ID | MAC Address |
+------
| 4fd0022b-
+------
[root@devstack0 ~]#
Table 60: two rules with dl_dst=
[root@devstack0 neutron]# ovs-ofctl dump-flows br-int table=60 | grep fa:16:3e:4b:db:3e
cookie=
cookie=
[root@devstack0 neutron]#
Stop/start the VM and check it again:
[root@devstack0 ~]# openstack server stop test-vm
[root@devstack0 ~]# openstack server start test-vm
[root@devstack0 ~]#
[root@devstack0 neutron]# ovs-ofctl dump-flows br-int table=60 | grep fa:16:3e:4b:db:3e
cookie=
[root@devstack0 neutron]#
You can see that the rule [1] has disappeared.
And there is a neutron-
Oct 10 08:50:05 devstack0 neutron-
Oct 10 08:50:05 devstack0 neutron-
I get this behavior on devstack with neutron from master branch.
It looks like this rule is disappeared because OVS interface under OVS port is recreated after VM stop/start and new OFPort object is creating with network_type=None (as well with physical_
I actually discovered this behavior while testing my neutron port-check plugin [3]
[root@devstack0 ~]# openstack port check 4fd0022b-
+------
| Field | Value |
+------
| firewall | - No flow: table=60, priority=
+------
[root@devstack0 ~]#
[1] https:/
[2] https:/
[3] https:/
tags: | added: ovs-fw |
Changed in neutron: | |
importance: | Undecided → High |
Seems we meet 2 problems: 0x1a51dc2aa3392 248, duration=14.201s, table=60, n_packets=25, n_bytes=2450, idle_age=697, priority= 90,dl_vlan= 2,dl_dst= fa:16:3e: 4b:db:3e actions= load:0x1d- >NXM_NX_ REG5[], load:0x2- >NXM_NX_ REG6[], strip_vlan, resubmit( ,81)
1. according to [1], for flat network should not install flow like this:
cookie=
for flat network, the vlan matching should be "vlan_tci= 0x0000/ 0x1fff" .
2. flow missing after port change ofport: 0x1a51dc2aa3392 248, duration=23.420s, table=60, n_packets=0, n_bytes=0, idle_age=1961, priority= 90,vlan_ tci=0x0000/ 0x1fff, dl_dst= fa:16:3e: 4b:db:3e actions= load:0x1c- >NXM_NX_ REG5[], load:0x2- >NXM_NX_ REG6[], resubmit( ,81)
cookie=
[1] https:/ /opendev. org/openstack/ neutron/ src/commit/ 78027da56ccb25d 19ac2c3bc1c174a cb2150e6a5/ neutron/ agent/linux/ openvswitch_ firewall/ firewall. py#L910