From: Eric Harney Date: Thu, 8 Oct 2015 18:46:21 +0000 (-0400) Subject: Provide better debug log when 'cinder manage' fails X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4dfb30b0f067183d31b29f202cc06b75c1cd8b61;p=openstack-build%2Fcinder-build.git Provide better debug log when 'cinder manage' fails 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 : create failed" Change-Id: I70c343a974926348f5e3b7e0fffbd0b976bc96a2 --- diff --git a/cinder/volume/flows/manager/create_volume.py b/cinder/volume/flows/manager/create_volume.py index 4fdc35428..d0947ff61 100644 --- a/cinder/volume/flows/manager/create_volume.py +++ b/cinder/volume/flows/manager/create_volume.py @@ -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)