]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Provide better debug log when 'cinder manage' fails
authorEric Harney <eharney@redhat.com>
Thu, 8 Oct 2015 18:46:21 +0000 (14:46 -0400)
committerEric Harney <eharney@redhat.com>
Thu, 8 Oct 2015 18:48:52 +0000 (14:48 -0400)
Change this DEBUG log message from:

  Updating volume: 7fd9a82d-0f11-4d1b-921d-97186a4e2df4 with
  {'status': 'error'} due to: ???

to:

  Updating volume: 7fd9a82d-0f11-4d1b-921d-97186a4e2df4 with
  {'status': 'error'} due to: Volume create failed while
  extracting volume ref.

When a volume manage operation fails here.

The subsequent ERROR log message remains as:
  "Volume <id>: create failed"

Change-Id: I70c343a974926348f5e3b7e0fffbd0b976bc96a2

cinder/volume/flows/manager/create_volume.py

index 4fdc354285d5c7ea8fd4e7dc92b6d18bb3f3b676..d0947ff616020de8246cbb4a1306a9397d3e034d 100644 (file)
@@ -213,7 +213,8 @@ class ExtractVolumeRefTask(flow_utils.CinderTask):
         if isinstance(result, ft.Failure) or not self.set_error:
             return
 
-        common.error_out_volume(context, self.db, volume_id)
+        reason = _('Volume create failed while extracting volume ref.')
+        common.error_out_volume(context, self.db, volume_id, reason=reason)
         LOG.error(_LE("Volume %s: create failed"), volume_id)