Add missing message parameter to LOG.exception call

Without the parameter call fails, see referenced bug for example.

Change-Id: Iaba6290ec92aabc8c9a0336dd3d6bf30de81ac3e
Closes-Bug: #1652281
This commit is contained in:
Dmitry Mescheryakov 2016-12-23 15:36:20 +04:00 committed by Dmitry Mescheryakov (dmitryme)
parent 7e4223630b
commit 13427c8448
7 changed files with 24 additions and 24 deletions

View File

@ -473,7 +473,7 @@ class CeilometerBaseTest(fuel_health.nmanager.PlatformServicesBaseClass):
try:
method(resource)
except Exception:
LOG.exception()
LOG.exception("")
@classmethod
def tearDownClass(cls):

View File

@ -190,7 +190,7 @@ def cleanup(cluster_deployment_info):
LOG.info('Delete server with name {0}'.format(s.name))
manager._get_compute_client().servers.delete(s.id)
except Exception:
LOG.exception()
LOG.exception("")
else:
LOG.info('No servers found')
@ -232,12 +232,12 @@ def _delete_it(client, log_message, name='ost1_test-', delete_type='name'):
else:
client.delete(item.id)
except Exception:
LOG.exception()
LOG.exception("")
except AttributeError:
if item.display_name.startswith(name):
client.delete(item)
except Exception:
LOG.exception()
LOG.exception("")
if __name__ == "__main__":

View File

@ -169,7 +169,7 @@ class Client(object):
connection = self._get_ssh_connection()
connection.close()
except paramiko.AuthenticationException:
LOG.exception()
LOG.exception("")
return False
return True

View File

@ -26,42 +26,42 @@ LOG = logging.getLogger(__name__)
try:
import heatclient.v1.client
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Heatclient could not be imported.')
try:
import muranoclient.v1.client
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Muranoclient could not be imported.')
try:
import saharaclient.client
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Sahara client could not be imported.')
try:
import ceilometerclient.v2.client
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Ceilometer client could not be imported.')
try:
import neutronclient.neutron.client
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Neutron client could not be imported.')
try:
import glanceclient
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Glance client could not be imported')
try:
import ironicclient
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Ironic client could not be imported')
try:
import muranoclient.glance.client as art_client
except Exception:
LOG.exception()
LOG.exception("")
LOG.warning('Artifacts client could not be imported')
import aodhclient.client
@ -516,7 +516,7 @@ class OfficialClientTest(fuel_health.test.TestCase):
.format(image=self.manager.config.compute.image_name)
)
except nova_exc.ClientException:
LOG.exception()
LOG.exception("")
self.fail("Image can not be retrieved. "
"Please refer to OpenStack logs for more details")
@ -619,7 +619,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
timeout=self.timeout)
return sshclient.exec_longrun_command(cmd)
except Exception:
LOG.exception()
LOG.exception("")
self.fail("%s command failed." % cmd)
def _create_keypair(self, client, namestart='ost1_test-keypair-smoke-'):
@ -670,7 +670,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
try:
client.security_group_rules.create(secgroup.id, **ruleset)
except Exception:
LOG.exception()
LOG.exception("")
self.fail("Failed to create rule in security group.")
return secgroup
@ -808,7 +808,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
try:
client.servers.add_floating_ip(server, floating_ip)
except Exception:
LOG.exception()
LOG.exception("")
self.fail('Can not assign floating ip to instance')
@classmethod
@ -834,7 +834,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
key_filename=self.key,
timeout=timeout)
except Exception:
LOG.exception()
LOG.exception("")
return self.retry_command(retries=retries[0],
timeout=retries[1],
@ -865,7 +865,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
timeout=timeout)
except Exception:
LOG.exception()
LOG.exception("")
command = "ping -q -c1 -w10 8.8.8.8"
@ -896,7 +896,7 @@ class NovaNetworkScenarioTest(OfficialClientTest):
LOG.debug('Host is {0}'.format(host))
except Exception:
LOG.exception()
LOG.exception("")
return self.retry_command(retries[0], retries[1],
ssh.exec_command_on_vm,

View File

@ -82,7 +82,7 @@ class SanityInfrastructureTest(nmanager.SanityChecksTest):
'Step 2 failed: Some nova services have not been started.')
except Exception:
LOG.info("Will sleep for 120 seconds and try again")
LOG.exception()
LOG.exception("")
time.sleep(120)
# Re-collect data silently
output = get_controllers_down_states()

View File

@ -128,6 +128,6 @@ class TestUserTenantRole(nmanager.SmokeChecksTest):
"logs for more details.",
failed_step=9)
except Exception:
LOG.exception()
LOG.exception("")
self.fail("Step 10 failed: Can not authenticate in Horizon. "
"Please refer to OpenStack logs for more details.")

View File

@ -227,7 +227,7 @@ class TestVcenter(nmanager.NovaNetworkScenarioTest):
if addr.startswith('novanetwork'):
instance_ip = server.addresses[addr][0]['addr']
except Exception:
LOG.exception()
LOG.exception("")
self.fail("Step 3 failed: cannot get instance details. "
"Please refer to OpenStack logs for more details.")
@ -285,7 +285,7 @@ class TestVcenterImageAction(nmanager.SmokeChecksTest):
if e.__class__.__name__ == 'NotFound':
return True
self.error_msg.append(e)
LOG.exception()
LOG.exception("")
return False
# Block until resource deletion has completed or timed-out