Revert "tests: Collect info on failure of conn_tester"
More info in bug report. I suggest we first revert, then re-introduce the collect_debug_info patch with a different approach. I suspect the fix is not trivial if indeed ordering is an issue and the namespaces are cleaned up before collect_debug_info is fired. Related-Bug: #1548547 Change-Id: Ice93abbc6e143cdbb90e7d41d1be86dc9eb05006
This commit is contained in:
parent
9b7e814cb6
commit
544753b211
|
@ -15,18 +15,13 @@
|
|||
import functools
|
||||
|
||||
import fixtures
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
from neutron.agent import firewall
|
||||
from neutron.agent.linux import ip_lib
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.common import constants
|
||||
from neutron.tests.common import machine_fixtures
|
||||
from neutron.tests.common import net_helpers
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConnectionTesterException(Exception):
|
||||
pass
|
||||
|
@ -115,12 +110,6 @@ class ConnectionTester(fixtures.Fixture):
|
|||
def peer_ip_address(self):
|
||||
return self._peer.ip
|
||||
|
||||
def collect_debug_info(self, exc_info):
|
||||
conntrack_entries = utils.execute(['conntrack', '-L'],
|
||||
run_as_root=True,
|
||||
check_exit_code=False)
|
||||
LOG.debug("Conntrack entries:\n%s", conntrack_entries)
|
||||
|
||||
def flush_arp_tables(self):
|
||||
"""Flush arptables in all used namespaces"""
|
||||
for machine in (self._peer, self._vm):
|
||||
|
@ -365,19 +354,3 @@ class LinuxBridgeConnectionTester(ConnectionTester):
|
|||
def flush_arp_tables(self):
|
||||
self.bridge.neigh.flush(4, 'all')
|
||||
super(LinuxBridgeConnectionTester, self).flush_arp_tables()
|
||||
|
||||
def collect_debug_info(self, exc_info):
|
||||
super(LinuxBridgeConnectionTester, self).collect_debug_info(exc_info)
|
||||
ip_wrapper = ip_lib.IPWrapper(self.bridge_namespace)
|
||||
ipt_rules = ip_wrapper.netns.execute(['iptables', '-L', '-nv'],
|
||||
run_as_root=True)
|
||||
LOG.debug('iptables rules in %s namespace:\n%s',
|
||||
self.bridge_namespace,
|
||||
ipt_rules)
|
||||
for namespace in (self.vm_namespace, self.peer_namespace):
|
||||
ip_wrapper = ip_lib.IPWrapper(namespace)
|
||||
ip_output = ip_wrapper.netns.execute(['ip', 'a'],
|
||||
run_as_root=True)
|
||||
LOG.debug('"ip a" in namespace %s:\n%s',
|
||||
namespace,
|
||||
ip_output)
|
||||
|
|
|
@ -116,7 +116,6 @@ class FirewallTestCase(base.BaseSudoTestCase):
|
|||
cfg.CONF.register_opts(sg_cfg.security_group_opts, 'SECURITYGROUP')
|
||||
super(FirewallTestCase, self).setUp()
|
||||
self.tester, self.firewall = getattr(self, self.initialize)()
|
||||
self.addOnException(self.tester.collect_debug_info)
|
||||
self.src_port_desc = self._create_port_description(
|
||||
self.tester.vm_port_id,
|
||||
[self.tester.vm_ip_address],
|
||||
|
|
Loading…
Reference in New Issue