Merge "Avoids logging error on ML2 OVS agent start"

This commit is contained in:
Jenkins 2016-04-01 09:04:52 +00:00 committed by Gerrit Code Review
commit 8121b4e0a5
3 changed files with 7 additions and 4 deletions

View File

@ -1102,7 +1102,10 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
bridge, prefix=constants.PEER_PHYSICAL_PREFIX)
# Interface type of port for physical and integration bridges must
# be same, so check only one of them.
int_type = self.int_br.db_get_val("Interface", int_if_name, "type")
# Not logging error here, as the interface may not exist yet.
# Type check is done to cleanup wrong interface if any.
int_type = self.int_br.db_get_val("Interface",
int_if_name, "type", log_errors=False)
if self.use_veth_interconnection:
# Drop ports if the interface types doesn't match the
# configuration value.

View File

@ -1080,7 +1080,7 @@ class TestOvsNeutronAgent(object):
mock.call.phys_br.setup_controllers(mock.ANY),
mock.call.phys_br.setup_default_table(),
mock.call.int_br.db_get_val('Interface', 'int-br-eth',
'type'),
'type', log_errors=False),
# Have to use __getattr__ here to avoid mock._Call.__eq__
# method being called
mock.call.int_br.db_get_val().__getattr__('__eq__')('veth'),

View File

@ -206,7 +206,7 @@ class TunnelTest(object):
constants.NONEXISTENT_PEER), ]
self.mock_int_bridge_expected += [
mock.call.db_get_val('Interface', 'int-%s' % self.MAP_TUN_BRIDGE,
'type'),
'type', log_errors=False),
mock.call.add_patch_port('int-%s' % self.MAP_TUN_BRIDGE,
constants.NONEXISTENT_PEER),
]
@ -661,7 +661,7 @@ class TunnelTestUseVethInterco(TunnelTest):
]
self.mock_int_bridge_expected += [
mock.call.db_get_val('Interface', 'int-%s' % self.MAP_TUN_BRIDGE,
'type'),
'type', log_errors=False),
mock.call.add_port(self.inta)
]