Merge "Replaces calls to traceback.format_exc()"
This commit is contained in:
commit
6b842b2cfb
@ -16,7 +16,6 @@
|
||||
|
||||
import functools
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
import neutronclient.common.exceptions as neutron_exc
|
||||
|
||||
@ -474,7 +473,7 @@ class CeilometerBaseTest(fuel_health.nmanager.PlatformServicesBaseClass):
|
||||
try:
|
||||
method(resource)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
|
@ -22,7 +22,6 @@ sys.path.append(path)
|
||||
|
||||
import logging
|
||||
import requests
|
||||
import traceback
|
||||
|
||||
from fuel_health import exceptions
|
||||
import fuel_health.nmanager
|
||||
@ -88,7 +87,7 @@ def cleanup(cluster_deployment_info):
|
||||
' group template deletion',
|
||||
delete_type='id')
|
||||
except Exception:
|
||||
LOG.warning(traceback.format_exc())
|
||||
LOG.exception('Failed sahara cluster cleanup')
|
||||
|
||||
if 'murano' in cluster_deployment_info:
|
||||
try:
|
||||
@ -108,8 +107,8 @@ def cleanup(cluster_deployment_info):
|
||||
requests.delete('{0}environments/{1}'.format(
|
||||
endpoint, e['id']), headers=headers)
|
||||
except Exception:
|
||||
LOG.warning('Failed to delete murano environment')
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed to delete murano \
|
||||
environment')
|
||||
|
||||
if compute_client is not None:
|
||||
flavors = compute_client.flavors.list()
|
||||
@ -119,11 +118,10 @@ def cleanup(cluster_deployment_info):
|
||||
LOG.info('Start flavor deletion.')
|
||||
compute_client.flavors.delete(flavor.id)
|
||||
except Exception:
|
||||
LOG.warning('Failed to delete flavor')
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed to delete flavor')
|
||||
|
||||
except Exception:
|
||||
LOG.warning(traceback.format_exc())
|
||||
LOG.exception('Failed murano cluster cleanup')
|
||||
|
||||
if 'ceilometer' in cluster_deployment_info:
|
||||
try:
|
||||
@ -152,9 +150,9 @@ def cleanup(cluster_deployment_info):
|
||||
LOG.info('Start stacks deletion.')
|
||||
heat_client.stacks.delete(s.id)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed stacks deletion')
|
||||
except Exception:
|
||||
LOG.warning(traceback.format_exc())
|
||||
LOG.exception('Failed during heat cluster deletion')
|
||||
|
||||
if 'ironic' in cluster_deployment_info:
|
||||
try:
|
||||
@ -187,12 +185,12 @@ def cleanup(cluster_deployment_info):
|
||||
manager._get_compute_client().floating_ips.delete(
|
||||
f.id)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed during floating ip delete')
|
||||
try:
|
||||
LOG.info('Delete server with name {0}'.format(s.name))
|
||||
manager._get_compute_client().servers.delete(s.id)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
else:
|
||||
LOG.info('No servers found')
|
||||
|
||||
@ -201,7 +199,7 @@ def cleanup(cluster_deployment_info):
|
||||
LOG.info('Wait for server terminations')
|
||||
manager.wait_for_server_termination(s)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failure on waiting for server termination')
|
||||
|
||||
_delete_it(manager._get_compute_client().keypairs,
|
||||
'Start keypair deletion')
|
||||
@ -234,12 +232,12 @@ def _delete_it(client, log_message, name='ost1_test-', delete_type='name'):
|
||||
else:
|
||||
client.delete(item.id)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
except AttributeError:
|
||||
if item.display_name.startswith(name):
|
||||
client.delete(item)
|
||||
except Exception:
|
||||
LOG.warning(traceback.format_exc())
|
||||
LOG.exception()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -48,5 +47,5 @@ class CloudValidationTest(nmanager.OfficialClientTest):
|
||||
key_filename=self.key, timeout=self.timeout)
|
||||
return sshclient.exec_longrun_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failure on ssh run cmd')
|
||||
self.fail("%s command failed." % cmd)
|
||||
|
@ -20,7 +20,6 @@ import os
|
||||
import select
|
||||
import socket
|
||||
import time
|
||||
import traceback
|
||||
import warnings
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -118,7 +117,7 @@ class Client(object):
|
||||
_timed_out = self._is_timed_out(self.timeout, _start_time)
|
||||
ssh.close()
|
||||
except (EOFError, paramiko.AuthenticationException, socket.error):
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Closed on connecting to server')
|
||||
return
|
||||
|
||||
def exec_command(self, command):
|
||||
@ -172,7 +171,7 @@ class Client(object):
|
||||
connection = self._get_ssh_connection()
|
||||
connection.close()
|
||||
except paramiko.AuthenticationException:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
return False
|
||||
|
||||
return True
|
||||
|
@ -15,7 +15,6 @@
|
||||
# under the License.
|
||||
|
||||
import signal
|
||||
import traceback
|
||||
|
||||
from fuel_health.common import log as logging
|
||||
|
||||
@ -176,7 +175,7 @@ class FuelTestAssertMixin(object):
|
||||
with timeout(secs, action):
|
||||
result = func(*args, **kwargs)
|
||||
except Exception as exc:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
if type(exc) is AssertionError:
|
||||
msg = str(exc)
|
||||
self.fail("Step %s failed: " % step + msg +
|
||||
|
@ -19,7 +19,6 @@ from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
import unittest2
|
||||
|
||||
import keystoneclient
|
||||
@ -613,8 +612,7 @@ class NailgunConfig(object):
|
||||
except exceptions.SetProxy as exc:
|
||||
raise exc
|
||||
except Exception:
|
||||
LOG.warning('Something wrong with endpoints')
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Something wrong with endpoints')
|
||||
|
||||
def _parse_cluster_attributes(self):
|
||||
api_url = '/api/clusters/%s/attributes' % self.cluster_id
|
||||
@ -873,11 +871,9 @@ class NailgunConfig(object):
|
||||
else:
|
||||
online_proxies.append({'ip': proxy_ip,
|
||||
'auth_passed': False})
|
||||
except Exception as e:
|
||||
LOG.warning('Can not connect to Keystone '
|
||||
'with proxy on {0}, error: {1}'
|
||||
.format(proxy_ip, e))
|
||||
LOG.debug(traceback.format_exc())
|
||||
except Exception:
|
||||
LOG.exception('Can not connect to Keystone with proxy \
|
||||
on {0}'.format(proxy_ip))
|
||||
return online_proxies
|
||||
|
||||
def set_proxy(self):
|
||||
@ -916,7 +912,8 @@ class NailgunConfig(object):
|
||||
'{0}, public vip is {1}'.format(management_vip, public_vip))
|
||||
else:
|
||||
public_vip = self.network.raw_data.get('public_vip', None)
|
||||
#management_vip = self.network.raw_data.get('management_vip', None)
|
||||
# management_vip = self.network.raw_data.get('management_vip',
|
||||
# None)
|
||||
|
||||
# workaround for api without management_vip for ha mode
|
||||
if not keystone_vip and 'ha' in self.mode:
|
||||
|
@ -16,7 +16,6 @@ from distutils import version
|
||||
import json
|
||||
import logging
|
||||
from lxml import etree
|
||||
import traceback
|
||||
|
||||
import fuel_health
|
||||
from fuel_health.common import ssh
|
||||
@ -198,7 +197,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
return json.loads(res.strip())
|
||||
return res.strip()
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Fail to get data from Hiera DB!")
|
||||
self.fail("Fail to get data from Hiera DB!")
|
||||
|
||||
def get_conf_values(self, variable="rabbit_password",
|
||||
@ -216,7 +215,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
LOG.debug("result is {0}".format(res))
|
||||
return res
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Fail to get data from config")
|
||||
self.fail("Fail to get data from config")
|
||||
|
||||
def get_amqp_hosts(self):
|
||||
@ -244,7 +243,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
LOG.debug('Checking AMQP host "{0}"...'.format(ip))
|
||||
remote.exec_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Failed to establish AMQP connection")
|
||||
self.fail("Failed to establish AMQP connection to {1}/tcp "
|
||||
"port on {0} from controller node!".format(ip, port))
|
||||
|
||||
@ -270,7 +269,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
self.queues.append(test_queue)
|
||||
remote.exec_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Failed to declare queue on host")
|
||||
self.fail("Failed to declare queue on host {0}".format(ip))
|
||||
|
||||
def publish_message(self):
|
||||
@ -295,7 +294,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
LOG.debug('Try to publish message {0}'.format(id))
|
||||
remote.exec_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Failed to publish message!")
|
||||
self.fail("Failed to publish message!")
|
||||
self.messages.append({'queue': test_queue, 'id': id})
|
||||
|
||||
@ -321,7 +320,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
'replicated over the cluster...'.format(id))
|
||||
remote.exec_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed to check message replication!')
|
||||
self.fail('Failed to check message replication!')
|
||||
self.messages.remove(message)
|
||||
break
|
||||
@ -347,7 +346,7 @@ class RabbitSanityClass(BaseTestCase):
|
||||
remote.exec_command(cmd)
|
||||
self.queues.remove(test_queue)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed to delete queue')
|
||||
self.fail('Failed to delete queue "{0}"!'.format(test_queue))
|
||||
|
||||
|
||||
@ -386,7 +385,7 @@ class TestPacemakerBase(BaseTestCase):
|
||||
timeout=self.timeout)
|
||||
return sshclient.exec_longrun_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Failed on run ssh cmd")
|
||||
self.fail("%s command failed." % cmd)
|
||||
|
||||
def _register_resource(self, res, res_name, resources):
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from fuel_health import nmanager
|
||||
import fuel_health.test
|
||||
@ -52,7 +51,7 @@ class IronicTest(nmanager.SanityChecksTest):
|
||||
try:
|
||||
self.ironic_client.node.delete(node.uuid)
|
||||
except ironic_exc.NotFound:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception('Failed on node delete {0}'.format(node.uuid))
|
||||
|
||||
def node_update(self, node, prop, value_prop, row='properties'):
|
||||
"""Add property with value to node properties."""
|
||||
|
@ -17,7 +17,6 @@ import contextlib
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import traceback
|
||||
import zipfile
|
||||
|
||||
try:
|
||||
@ -82,13 +81,15 @@ class MuranoTest(fuel_health.nmanager.PlatformServicesBaseClass):
|
||||
try:
|
||||
self.delete_environment(environment_id)
|
||||
except Exception:
|
||||
LOG.warning(traceback.format_exc())
|
||||
LOG.exception('Failure to delete environment \
|
||||
{0}'.format(environment_id))
|
||||
if self.packages:
|
||||
for package in self.packages:
|
||||
try:
|
||||
self.delete_package(package.id)
|
||||
except Exception:
|
||||
LOG.warning(traceback.format_exc())
|
||||
LOG.exception('Failure to delete package \
|
||||
{0}'.format(package.id))
|
||||
|
||||
super(MuranoTest, self).tearDown()
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
import fuel_health.nmanager
|
||||
|
||||
@ -126,7 +125,7 @@ class NeutronBaseTest(fuel_health.nmanager.NovaNetworkScenarioTest):
|
||||
cls.compute_client.floating_ips.delete(ip)
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
@classmethod
|
||||
def _clear_networks(cls):
|
||||
@ -136,7 +135,7 @@ class NeutronBaseTest(fuel_health.nmanager.NovaNetworkScenarioTest):
|
||||
if 'ost1_' in srv.name]
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
for router in cls.routers:
|
||||
try:
|
||||
cls.neutron_client.remove_gateway_router(
|
||||
@ -148,21 +147,21 @@ class NeutronBaseTest(fuel_health.nmanager.NovaNetworkScenarioTest):
|
||||
cls.neutron_client.delete_router(router)
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
for subnet in cls.subnets:
|
||||
try:
|
||||
cls.neutron_client.delete_subnet(subnet['id'])
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
for network in cls.networks:
|
||||
try:
|
||||
cls.neutron_client.delete_network(network['id'])
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
try:
|
||||
sec_groups = cls.compute_client.security_groups.list()
|
||||
@ -171,7 +170,7 @@ class NeutronBaseTest(fuel_health.nmanager.NovaNetworkScenarioTest):
|
||||
if 'ost1_test-secgroup-smoke' in group.name]
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
@classmethod
|
||||
def _cleanup_ports(cls):
|
||||
|
@ -17,7 +17,6 @@
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import traceback
|
||||
|
||||
import fuel_health.common.utils.data_utils as data_utils
|
||||
|
||||
@ -27,32 +26,37 @@ LOG = logging.getLogger(__name__)
|
||||
try:
|
||||
import heatclient.v1.client
|
||||
except Exception:
|
||||
LOG.exception()
|
||||
LOG.warning('Heatclient could not be imported.')
|
||||
try:
|
||||
import muranoclient.v1.client
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
LOG.warning('Muranoclient could not be imported.')
|
||||
try:
|
||||
import saharaclient.client
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
LOG.warning('Sahara client could not be imported.')
|
||||
try:
|
||||
import ceilometerclient.v2.client
|
||||
except Exception:
|
||||
LOG.exception()
|
||||
LOG.warning('Ceilometer client could not be imported.')
|
||||
try:
|
||||
import neutronclient.neutron.client
|
||||
except Exception:
|
||||
LOG.exception()
|
||||
LOG.warning('Neutron client could not be imported.')
|
||||
try:
|
||||
import glanceclient
|
||||
except Exception:
|
||||
LOG.exception()
|
||||
LOG.warning('Glance client could not be imported')
|
||||
try:
|
||||
import ironicclient
|
||||
except Exception:
|
||||
LOG.exception()
|
||||
LOG.warning('Ironic client could not be imported')
|
||||
|
||||
import aodhclient.client
|
||||
@ -99,8 +103,7 @@ class OfficialClientManager(fuel_health.manager.Manager):
|
||||
"Unexpected error durring intialize keystoneclient: {0}"
|
||||
.format(e)
|
||||
)
|
||||
LOG.debug(traceback.format_exc())
|
||||
self.traceback = traceback.format_exc()
|
||||
LOG.exception("Unexpected error durring intialize keystoneclient")
|
||||
|
||||
if self.clients_initialized:
|
||||
self.glance_client = self._get_glance_client()
|
||||
@ -423,10 +426,10 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
def is_deletion_complete():
|
||||
try:
|
||||
server.get()
|
||||
except Exception as e:
|
||||
if e.__class__.__name__ == 'NotFound':
|
||||
except Exception as exc:
|
||||
if exc.__class__.__name__ == 'NotFound':
|
||||
return True
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
return False
|
||||
|
||||
fuel_health.test.call_until_true(
|
||||
@ -445,9 +448,7 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
else:
|
||||
return result
|
||||
except Exception as exc:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.debug("%s. Another"
|
||||
" effort needed." % exc)
|
||||
LOG.debug("%s. Another effort needed." % exc)
|
||||
time.sleep(timeout)
|
||||
if 'ping' not in kwargs.get('command'):
|
||||
self.fail('Execution command on Instance fails '
|
||||
@ -485,7 +486,7 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
.format(image=self.manager.config.compute.image_name)
|
||||
)
|
||||
except nova_exc.ClientException:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
self.fail("Image can not be retrieved. "
|
||||
"Please refer to OpenStack logs for more details")
|
||||
|
||||
@ -497,7 +498,7 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
cls.compute_client.flavors.delete(flavor)
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
@classmethod
|
||||
def _clean_images(cls):
|
||||
@ -507,7 +508,7 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
cls.glance_client.images.delete(image_id)
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
@ -521,12 +522,12 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
# OpenStack resources are assumed to have a delete()
|
||||
# method which destroys the resource...
|
||||
thing.delete()
|
||||
except Exception as e:
|
||||
except Exception as exc:
|
||||
# If the resource is already missing, mission accomplished.
|
||||
if e.__class__.__name__ == 'NotFound':
|
||||
if exc.__class__.__name__ == 'NotFound':
|
||||
continue
|
||||
cls.error_msg.append(e)
|
||||
LOG.debug(traceback.format_exc())
|
||||
cls.error_msg.append(exc)
|
||||
LOG.exception(exc)
|
||||
|
||||
def is_deletion_complete():
|
||||
# Deletion testing is only required for objects whose
|
||||
@ -535,13 +536,13 @@ class OfficialClientTest(fuel_health.test.TestCase):
|
||||
return True
|
||||
try:
|
||||
thing.get()
|
||||
except Exception as e:
|
||||
except Exception as exc:
|
||||
# Clients are expected to return an exception
|
||||
# called 'NotFound' if retrieval fails.
|
||||
if e.__class__.__name__ == 'NotFound':
|
||||
if exc.__class__.__name__ == 'NotFound':
|
||||
return True
|
||||
cls.error_msg.append(e)
|
||||
LOG.debug(traceback.format_exc())
|
||||
cls.error_msg.append(exc)
|
||||
LOG.exception(exc)
|
||||
return False
|
||||
|
||||
# Block until resource deletion has completed or timed-out
|
||||
@ -587,7 +588,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
key_filename=self.key, timeout=self.timeout)
|
||||
return sshclient.exec_longrun_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
self.fail("%s command failed." % cmd)
|
||||
|
||||
def _create_keypair(self, client, namestart='ost1_test-keypair-smoke-'):
|
||||
@ -638,7 +639,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
try:
|
||||
client.security_group_rules.create(secgroup.id, **ruleset)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
self.fail("Failed to create rule in security group.")
|
||||
|
||||
return secgroup
|
||||
@ -678,7 +679,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
cls.compute_client.networks.delete(net)
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
@classmethod
|
||||
def _clear_security_groups(cls):
|
||||
@ -689,7 +690,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
if 'ost1_test-' in group.name]
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
def _list_networks(self):
|
||||
nets = self.compute_client.networks.list()
|
||||
@ -776,7 +777,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
try:
|
||||
client.servers.add_floating_ip(server, floating_ip)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
self.fail('Can not assign floating ip to instance')
|
||||
|
||||
@classmethod
|
||||
@ -789,7 +790,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
cls.compute_client.floating_ips.delete(ip)
|
||||
except Exception as exc:
|
||||
cls.error_msg.append(exc)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(exc)
|
||||
|
||||
def _ping_ip_address(self, ip_address, timeout, retries):
|
||||
def ping():
|
||||
@ -802,7 +803,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
key_filename=self.key,
|
||||
timeout=timeout)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
|
||||
return self.retry_command(retries=retries[0],
|
||||
timeout=retries[1],
|
||||
@ -833,7 +834,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
timeout=timeout)
|
||||
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
|
||||
command = "ping -q -c1 -w10 8.8.8.8"
|
||||
|
||||
@ -864,7 +865,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
|
||||
LOG.debug('Host is {0}'.format(host))
|
||||
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
|
||||
return self.retry_command(retries[0], retries[1],
|
||||
ssh.exec_command_on_vm,
|
||||
@ -1447,5 +1448,4 @@ class SmokeChecksTest(OfficialClientTest):
|
||||
try:
|
||||
cls.compute_client.flavors.delete(cls.created_flavors)
|
||||
except Exception:
|
||||
LOG.debug("OSTF test flavor cannot be deleted.")
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("OSTF test flavor cannot be deleted.")
|
||||
|
@ -17,7 +17,6 @@
|
||||
# under the License.
|
||||
|
||||
import time
|
||||
import traceback
|
||||
|
||||
import testresources
|
||||
import unittest2
|
||||
@ -142,5 +141,5 @@ class TestCase(BaseTestCase):
|
||||
key_filename=self.key, timeout=self.timeout)
|
||||
return sshclient.exec_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Failed while opening ssh session with host")
|
||||
self.fail("{0} command failed.".format(cmd))
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from fuel_health.common.ssh import Client as SSHClient
|
||||
from fuel_health.common.utils import data_utils
|
||||
@ -42,7 +41,7 @@ class TestMysqlReplication(BaseMysqlTest):
|
||||
SSHClient(cls.master_ip, cls.node_user,
|
||||
key_filename=cls.node_key).exec_command(cmd)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Failed to connect to mysql cmd:{0}".format(cmd))
|
||||
|
||||
def test_mysql_replication(self):
|
||||
"""Check data replication over mysql
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
import logging
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from fuel_health.common.ssh import Client as SSHClient
|
||||
from fuel_health import nmanager
|
||||
@ -80,7 +79,7 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
|
||||
'have not been started.')
|
||||
except Exception:
|
||||
LOG.info("Will sleep for 120 seconds and try again")
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
time.sleep(120)
|
||||
self.verify_response_true(
|
||||
downstate not in output, 'Step 2 failed: Some nova services '
|
||||
|
@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from fuel_health.common.utils.data_utils import rand_name
|
||||
from fuel_health import nmanager
|
||||
@ -60,8 +59,8 @@ class TestInstanceLiveMigration(nmanager.NovaNetworkScenarioTest):
|
||||
self._delete_server(server)
|
||||
self.servers.remove(server)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.debug("Server was already deleted.")
|
||||
LOG.exception("Server {0} already \
|
||||
deleted.".format(server))
|
||||
|
||||
def test_001_live_migration(self):
|
||||
"""Instance live migration
|
||||
|
@ -16,7 +16,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from fuel_health.common.utils.data_utils import rand_name
|
||||
from fuel_health import nmanager
|
||||
@ -62,8 +61,8 @@ class TestNovaNetwork(nmanager.NovaNetworkScenarioTest):
|
||||
self._delete_server(server)
|
||||
self.servers.remove(server)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.debug("Server was already deleted.")
|
||||
LOG.exception("Server {0} was already \
|
||||
deleted.".format(server))
|
||||
|
||||
def test_001_create_keypairs(self):
|
||||
"""Create keypair
|
||||
@ -278,7 +277,7 @@ class TestNovaNetwork(nmanager.NovaNetworkScenarioTest):
|
||||
else:
|
||||
compute = None
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception("Unable to get instance details")
|
||||
self.fail("Step 3 failed: cannot get instance details. "
|
||||
"Please refer to OpenStack logs for more details.")
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from fuel_health.common.utils.data_utils import rand_name
|
||||
from fuel_health import nmanager
|
||||
@ -71,7 +70,7 @@ class TestImageAction(nmanager.SmokeChecksTest):
|
||||
if e.__class__.__name__ == 'NotFound':
|
||||
return True
|
||||
self.error_msg.append(e)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception(e)
|
||||
return False
|
||||
|
||||
# Block until resource deletion has completed or timed-out
|
||||
|
@ -15,8 +15,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
import requests
|
||||
|
||||
from fuel_health import nmanager
|
||||
@ -132,6 +130,6 @@ class TestUserTenantRole(nmanager.SmokeChecksTest):
|
||||
"logs for more details.",
|
||||
failed_step=9)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
self.fail("Step 10 failed: Can not authenticate in Horizon. "
|
||||
"Please refer to OpenStack logs for more details.")
|
||||
|
@ -15,7 +15,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
from fuel_health.common.utils.data_utils import rand_name
|
||||
from fuel_health import nmanager
|
||||
@ -57,8 +56,7 @@ class TestVcenter(nmanager.NovaNetworkScenarioTest):
|
||||
self._delete_server(server)
|
||||
self.servers.remove(server)
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.debug("Server was already deleted.")
|
||||
LOG.exception("Server was already deleted.")
|
||||
|
||||
@classmethod
|
||||
def find_flavor_id(cls):
|
||||
@ -231,7 +229,7 @@ class TestVcenter(nmanager.NovaNetworkScenarioTest):
|
||||
if addr.startswith('novanetwork'):
|
||||
instance_ip = server.addresses[addr][0]['addr']
|
||||
except Exception:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
self.fail("Step 3 failed: cannot get instance details. "
|
||||
"Please refer to OpenStack logs for more details.")
|
||||
|
||||
@ -289,7 +287,7 @@ class TestVcenterImageAction(nmanager.SmokeChecksTest):
|
||||
if e.__class__.__name__ == 'NotFound':
|
||||
return True
|
||||
self.error_msg.append(e)
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.exception()
|
||||
return False
|
||||
|
||||
# Block until resource deletion has completed or timed-out
|
||||
|
Loading…
Reference in New Issue
Block a user