From 6e201f5bc488c1a1ad126cf7c0a4915c452c2e8b Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Wed, 1 Oct 2014 04:21:39 +0000 Subject: Add the start message for debugging net info When a network scenario test fails due to networking timeout, we can get both server console log and network information for debugging. Current network information doesn't contain the start message and it seems a little confusion where starts network info. This patch adds the message. Change-Id: I8490c08b7073302d299f7b63dd9d6380d8a8d27e Related-Bug: #1323658 --- tempest/scenario/manager.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py index 99336461e..db58d879e 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -396,6 +396,12 @@ class ScenarioTest(tempest.test.BaseTestCase): LOG.debug(self.servers_client.get_console_output(server['id'], length=None)) + def _log_net_info(self, exc): + # network debug is called as part of ssh init + if not isinstance(exc, exceptions.SSHTimeout): + LOG.debug('Network information on a devstack host') + debug.log_net_debug() + def create_server_snapshot(self, server, name=None): # Glance client _image_client = self.image_client @@ -676,9 +682,7 @@ class NetworkScenarioTest(ScenarioTest): ex_msg += ": " + msg LOG.exception(ex_msg) self._log_console_output(servers) - # network debug is called as part of ssh init - if not isinstance(e, exceptions.SSHTimeout): - debug.log_net_debug() + self._log_net_info(e) raise def _check_tenant_network_connectivity(self, server, @@ -702,9 +706,7 @@ class NetworkScenarioTest(ScenarioTest): except Exception as e: LOG.exception('Tenant network connectivity check failed') self._log_console_output(servers_for_debug) - # network debug is called as part of ssh init - if not isinstance(e, exceptions.SSHTimeout): - debug.log_net_debug() + self._log_net_info(e) raise def _check_remote_connectivity(self, source, dest, should_succeed=True): -- cgit v1.2.1