]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add exception logging if flow creation fails
authorJoshua Harlow <harlowja@yahoo-inc.com>
Tue, 17 Dec 2013 23:20:02 +0000 (15:20 -0800)
committerJoshua Harlow <harlowja@yahoo-inc.com>
Tue, 17 Dec 2013 23:20:02 +0000 (15:20 -0800)
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

cinder/scheduler/manager.py
cinder/volume/api.py
cinder/volume/manager.py

index b4d342717e8ba0c2cacd22d685a77fa8c6f4c398..515ef8c135720d0446217ddc95571fc2541044bd 100644 (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()
index 857c107ae719ec2bdaa4fe7427c3676d9557ff08..90a41242f09a326f82c3026ef888497ab16769df 100644 (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"))
 
index 0c238072abbdf7f46b78e60ec626f91d90215a4f..52ab941d96e594cda8eaa2584a87e853a7e2697c 100644 (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"))