Graceful OVS restart for DVR
Graceful OVS restart that was intoduced in I95070d8218859d4fff1d572c1792cdf6019dd7ea missed that flows are also dropped in setup_dvr_flows_on_integ_br. Related-bug: #1383674 Change-Id: I7b24a159962af7b58c096a1b2766e2169e9f8aed
This commit is contained in:
parent
6f109bd642
commit
053bfc5a4f
|
@ -13,6 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
import oslo_messaging
|
||||
from oslo_utils import excutils
|
||||
|
@ -25,6 +26,9 @@ from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants
|
|||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
cfg.CONF.import_group('AGENT', 'neutron.plugins.ml2.drivers.openvswitch.'
|
||||
'agent.common.config')
|
||||
|
||||
|
||||
# A class to represent a DVR-hosted subnet including vif_ports resident on
|
||||
# that subnet
|
||||
|
@ -134,6 +138,7 @@ class OVSDVRNeutronAgent(object):
|
|||
self.dvr_mac_address = None
|
||||
if self.enable_distributed_routing:
|
||||
self.get_dvr_mac_address()
|
||||
self.conf = cfg.CONF
|
||||
|
||||
def setup_dvr_flows(self):
|
||||
self.setup_dvr_flows_on_integ_br()
|
||||
|
@ -205,7 +210,8 @@ class OVSDVRNeutronAgent(object):
|
|||
LOG.info(_LI("L2 Agent operating in DVR Mode with MAC %s"),
|
||||
self.dvr_mac_address)
|
||||
# Remove existing flows in integration bridge
|
||||
self.int_br.delete_flows()
|
||||
if self.conf.AGENT.drop_flows_on_start:
|
||||
self.int_br.delete_flows()
|
||||
|
||||
# Add a canary flow to int_br to track OVS restarts
|
||||
self.int_br.setup_canary_table()
|
||||
|
|
|
@ -2129,7 +2129,6 @@ class TestOvsDvrNeutronAgent(object):
|
|||
ioport = self.agent.dvr_agent.int_ofports[physical_networks[0]]
|
||||
expected_on_int_br = [
|
||||
# setup_dvr_flows_on_integ_br
|
||||
mock.call.delete_flows(),
|
||||
mock.call.setup_canary_table(),
|
||||
mock.call.install_drop(table_id=constants.DVR_TO_SRC_MAC,
|
||||
priority=1),
|
||||
|
|
Loading…
Reference in New Issue