diff options
author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2014-10-01 04:21:39 +0000 |
---|---|---|
committer | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2014-10-01 04:22:06 +0000 |
commit | 6e201f5bc488c1a1ad126cf7c0a4915c452c2e8b (patch) | |
tree | 8f4196e12a1c073c2c9ecc9896e04d7e8a8b2e29 | |
parent | 1a8b6db4fd23fb98d8d7fcafe5f86f5384e3dbc6 (diff) | |
download | tempest-6e201f5bc488c1a1ad126cf7c0a4915c452c2e8b.tar.gz |
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
-rw-r--r-- | tempest/scenario/manager.py | 14 |
1 files 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): |