Add exception logging if flow creation fails

If the create_XYZ_flow fails in being created
its useful to log exactly what the error was in
detail (instead of trapping it and only raising
a generic error). The more detailed error shows
what the real problem was during the flows
construction (which usually is some larger
problem).

Change-Id: I9cd6b8e2c6298d8791ba3063be78f9b4c4a7c5d0
This commit is contained in:
Joshua Harlow 2013-12-17 15:20:02 -08:00
parent 54b7842b8e
commit 61786a8924
3 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,7 @@ class SchedulerManager(manager.Manager):
snapshot_id,
image_id)
except Exception:
LOG.exception(_("Failed to create scheduler manager volume flow"))
raise exception.CinderException(
_("Failed to create scheduler manager volume flow"))
flow_engine.run()

View File

@ -167,6 +167,7 @@ class API(base.Base):
check_volume_az_zone,
create_what)
except Exception:
LOG.exception(_("Failed to create api volume flow"))
raise exception.CinderException(
_("Failed to create api volume flow"))

View File

@ -310,6 +310,7 @@ class VolumeManager(manager.SchedulerDependentManager):
request_spec=request_spec,
filter_properties=filter_properties)
except Exception:
LOG.exception(_("Failed to create manager volume flow"))
raise exception.CinderException(
_("Failed to create manager volume flow"))