From c3c31fcff7717e0112616902780d4c762bd66702 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Wed, 20 Feb 2013 15:34:05 +0000 Subject: [PATCH] Fix various exception paths Fixes bug 1130723 Some bugs were introduced in https://review.openstack.org/#/c/20514/ this patch fixes the discovered errors. It also removes volume_id parameters from error messages. Change-Id: I9ff75482fe2bc13dbb65e7d666035a13a19d5c98 --- cinder/volume/manager.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 4e4f3de91..a810a9331 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -209,6 +209,7 @@ class VolumeManager(manager.SchedulerDependentManager): status = 'available' model_update = False image_meta = None + cloned = False try: vol_name = volume_ref['name'] @@ -306,11 +307,10 @@ class VolumeManager(manager.SchedulerDependentManager): self._notify_about_volume_usage(context, volume_ref, "create.end") return volume_ref['id'] - def _log_original_error(self, exc_info, volume_id): + def _log_original_error(self, exc_info): type_, value, tb = exc_info LOG.error(_('Error: %s') % - traceback.format_exception(type_, value, tb), - volume_id=volume_id) + traceback.format_exception(type_, value, tb)) def _reschedule_or_reraise(self, context, volume_id, exc_info, snapshot_id, image_id, request_spec, @@ -335,12 +335,11 @@ class VolumeManager(manager.SchedulerDependentManager): except Exception: rescheduled = False - LOG.exception(_("Error trying to reschedule %(volume_id)s"), - volume_id=volume_id) + LOG.exception(_("Error trying to reschedule")) if rescheduled: # log the original build error - self._log_original_error(exc_info, volume_id) + self._log_original_error(exc_info) else: # not re-scheduling raise exc_info[0], exc_info[1], exc_info[2] -- 2.45.2