_log_console_output do not raise NotFound
_log_console_output is typically used for debugging purposes,
usually in an exception handler. It can receive a list of
servers for printing the serial console's output,
but it is possible, in the mean time the server get deleted.
Raising NotFound in the above case, makes very confusing to
read the debug log.
Change-Id: Ic2bab4d20ddc1e35e8683d28fd456ce619c0390d
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index dd1adc7..59d0b90 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -402,10 +402,14 @@
servers = self.servers_client.list_servers()
servers = servers['servers']
for server in servers:
- console_output = self.servers_client.get_console_output(
- server['id'])['output']
- LOG.debug('Console output for %s\nbody=\n%s',
- server['id'], console_output)
+ try:
+ console_output = self.servers_client.get_console_output(
+ server['id'])['output']
+ LOG.debug('Console output for %s\nbody=\n%s',
+ server['id'], console_output)
+ except lib_exc.NotFound:
+ LOG.debug("Server %s disappeared(deleted) while looking"
+ "for the console log", server['id'])
def _log_net_info(self, exc):
# network debug is called as part of ssh init