Ensure drop flows on br-int at agent startup for DVR too
Commit 90212b12 changed the OVS agent so adding vital drop flows on
br-int (table 0 priority 2) for packets from physical bridges was
deferred until DVR initialization later on. But if br-int has no flows
from a previous run (eg after host reboot), then these packets will hit
the NORMAL flow in table 60. And if there is more than one physical
bridge, then the physical interfaces from the different bridges are now
essentially connected at layer 2 and a network loop is possible in the
time before the flows are added by DVR. Also the DVR code won't add them
until after RPC calls to the server, so a loop is more likely if the
server is not available.
This patch restores adding these flows to when the physical bridges are
first configured. Also updated a comment that was no longer correct and
updated the unit test.
Reviewed: https:/ /review. opendev. org/742355 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=143fe8ff89b a776618ed6291af 9d5e28e4662bdb
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit 143fe8ff89ba776 618ed6291af9d5e 28e4662bdb
Author: Darragh O'Reilly <email address hidden>
Date: Mon Jul 13 14:48:10 2020 +0000
Ensure drop flows on br-int at agent startup for DVR too
Commit 90212b12 changed the OVS agent so adding vital drop flows on
br-int (table 0 priority 2) for packets from physical bridges was
deferred until DVR initialization later on. But if br-int has no flows
from a previous run (eg after host reboot), then these packets will hit
the NORMAL flow in table 60. And if there is more than one physical
bridge, then the physical interfaces from the different bridges are now
essentially connected at layer 2 and a network loop is possible in the
time before the flows are added by DVR. Also the DVR code won't add them
until after RPC calls to the server, so a loop is more likely if the
server is not available.
This patch restores adding these flows to when the physical bridges are
first configured. Also updated a comment that was no longer correct and
updated the unit test.
Change-Id: I42c33fefaae6a7 bee134779c840f3 5632823472e 5abbc5cb03fb320 1383122eb8)
Closes-Bug: #1887148
Related-Bug: #1869808
(cherry picked from commit c1a77ef8b74bb9b