Merge "Only use LOG.exception in exception handler"
This commit is contained in:
commit
37a826d1fe
@ -425,8 +425,8 @@ class BaseVD(object):
|
|||||||
# flag in the interface is for anticipation that it will be enabled
|
# flag in the interface is for anticipation that it will be enabled
|
||||||
# in the future.
|
# in the future.
|
||||||
if remote:
|
if remote:
|
||||||
LOG.exception(_LE("Detaching snapshot from a remote node "
|
LOG.error(_LE("Detaching snapshot from a remote node "
|
||||||
"is not supported."))
|
"is not supported."))
|
||||||
raise exception.NotSupportedOperation(
|
raise exception.NotSupportedOperation(
|
||||||
operation=_("detach snapshot from remote node"))
|
operation=_("detach snapshot from remote node"))
|
||||||
else:
|
else:
|
||||||
@ -993,8 +993,8 @@ class BaseVD(object):
|
|||||||
# flag in the interface is for anticipation that it will be enabled
|
# flag in the interface is for anticipation that it will be enabled
|
||||||
# in the future.
|
# in the future.
|
||||||
if remote:
|
if remote:
|
||||||
LOG.exception(_LE("Attaching snapshot from a remote node "
|
LOG.error(_LE("Attaching snapshot from a remote node "
|
||||||
"is not supported."))
|
"is not supported."))
|
||||||
raise exception.NotSupportedOperation(
|
raise exception.NotSupportedOperation(
|
||||||
operation=_("attach snapshot from remote node"))
|
operation=_("attach snapshot from remote node"))
|
||||||
else:
|
else:
|
||||||
|
@ -697,7 +697,7 @@ class LVMVolumeDriver(driver.VolumeDriver):
|
|||||||
"check your configuration because source and "
|
"check your configuration because source and "
|
||||||
"destination are the same Volume Group: %(name)s.") %
|
"destination are the same Volume Group: %(name)s.") %
|
||||||
{'id': volume['id'], 'name': self.vg.vg_name})
|
{'id': volume['id'], 'name': self.vg.vg_name})
|
||||||
LOG.exception(message)
|
LOG.error(message)
|
||||||
raise exception.VolumeBackendAPIException(data=message)
|
raise exception.VolumeBackendAPIException(data=message)
|
||||||
|
|
||||||
def get_pool(self, volume):
|
def get_pool(self, volume):
|
||||||
|
@ -807,8 +807,8 @@ class CreateVolumeFromSpecTask(flow_utils.CinderTask):
|
|||||||
# we can't do anything if the driver didn't init
|
# we can't do anything if the driver didn't init
|
||||||
if not self.driver.initialized:
|
if not self.driver.initialized:
|
||||||
driver_name = self.driver.__class__.__name__
|
driver_name = self.driver.__class__.__name__
|
||||||
LOG.exception(_LE("Unable to create volume. "
|
LOG.error(_LE("Unable to create volume. "
|
||||||
"Volume driver %s not initialized"), driver_name)
|
"Volume driver %s not initialized"), driver_name)
|
||||||
raise exception.DriverNotInitialized()
|
raise exception.DriverNotInitialized()
|
||||||
|
|
||||||
create_type = volume_spec.pop('type', None)
|
create_type = volume_spec.pop('type', None)
|
||||||
|
@ -2626,9 +2626,9 @@ class VolumeManager(manager.SchedulerDependentManager):
|
|||||||
if model_update:
|
if model_update:
|
||||||
if model_update['status'] in ['error_deleting', 'error']:
|
if model_update['status'] in ['error_deleting', 'error']:
|
||||||
msg = (_('Delete consistency group failed.'))
|
msg = (_('Delete consistency group failed.'))
|
||||||
LOG.exception(msg,
|
LOG.error(msg,
|
||||||
resource={'type': 'consistency_group',
|
resource={'type': 'consistency_group',
|
||||||
'id': group.id})
|
'id': group.id})
|
||||||
raise exception.VolumeDriverException(message=msg)
|
raise exception.VolumeDriverException(message=msg)
|
||||||
else:
|
else:
|
||||||
group.update(model_update)
|
group.update(model_update)
|
||||||
@ -2779,7 +2779,7 @@ class VolumeManager(manager.SchedulerDependentManager):
|
|||||||
if model_update['status'] in ['error']:
|
if model_update['status'] in ['error']:
|
||||||
msg = (_('Error occurred when updating consistency group '
|
msg = (_('Error occurred when updating consistency group '
|
||||||
'%s.') % group.id)
|
'%s.') % group.id)
|
||||||
LOG.exception(msg)
|
LOG.error(msg)
|
||||||
raise exception.VolumeDriverException(message=msg)
|
raise exception.VolumeDriverException(message=msg)
|
||||||
group.update(model_update)
|
group.update(model_update)
|
||||||
group.save()
|
group.save()
|
||||||
|
Loading…
Reference in New Issue
Block a user