Change in vdsm[master]: hotplugDisk: Handle prepareVolumePath errors gracefully.

aaviram at redhat.com aaviram at redhat.com
Thu Mar 3 07:20:15 UTC 2016


Amit Aviram has posted comments on this change.

Change subject: hotplugDisk: Handle prepareVolumePath errors gracefully.
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/54266/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2650:         diskParams = params.get('drive', {})
Line 2651:         try:
Line 2652:             diskParams['path'] = self.cif.prepareVolumePath(diskParams)
Line 2653:         except VolumeError as e:
Line 2654:             self.log.error(traceback.format_exc())
> Use self.log.exception("description ...")
Done
Line 2655:             return response.error(
Line 2656:                 'hotplugDisk',
Line 2657:                 "Preparing path during hotplug disk failed: %s" % e)
Line 2658: 


Line 2653:         except VolumeError as e:
Line 2654:             self.log.error(traceback.format_exc())
Line 2655:             return response.error(
Line 2656:                 'hotplugDisk',
Line 2657:                 "Preparing path during hotplug disk failed: %s" % e)
> I think that "Cannot prepare path: %s" is better.
Supplying a message to response.error will set the message that the user will eventually see, and replace the 'hotplugDisk' default message, so I think it is better for ux
Line 2658: 
Line 2659:         if isVdsmImage(diskParams):
Line 2660:             self._normalizeVdsmImg(diskParams)
Line 2661:             self._createTransientDisk(diskParams)


-- 
To view, visit https://gerrit.ovirt.org/54266
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list