Change in vdsm[master]: clientIF: prepareVolumePath payload cleanup

fromani at redhat.com fromani at redhat.com
Mon Feb 10 12:27:35 UTC 2014


Francesco Romani has posted comments on this change.

Change subject: clientIF: prepareVolumePath payload cleanup
......................................................................


Patch Set 6:

(3 comments)

http://gerrit.ovirt.org/#/c/22928/6/vdsm/clientIF.py
File vdsm/clientIF.py:

Line 284: shoaw_bug
> typo "shoaw"
Done (tnx for spotting this!)


Line 315:         self.log.info("prepared volume path: %s", volPath)
Line 316:         return volPath
Line 317: 
Line 318:     def _prepareVolumeFromPayload(self, vmId, drive, device, payload):
Line 319:         '''
> s/'''/"""/
Done
Line 320:         vmPayload is a key in params
Line 321:         'vmPayload': {'volId': 'volume id',   # volId is optional
Line 322:                       'file': {'filename': 'content', ...}}
Line 323:         '''


Line 330: 
Line 331:         try:
Line 332:             mkFsFunction = getattr(supervdsm.getProxy(),
Line 333:                                    mkFsNames[device])
Line 334:         except RuntimeError:
> Can you elaborate on the change of checking for RuntimeError (very generic)
Here I was trying to comply to Nir's comment in revision 4 (http://gerrit.ovirt.org/#/c/22928/4/vdsm/clientIF.py,cm)

For the sake of review, I'm quoting myself here:
"""
supervdsm.ProxyCaller wraps a multiprocessing' RemoteError into a RuntimeError and then retries to ensure the connection.

Then I handled RuntimeError here and changed the message in the exception.
"""

I'll add (an amended version of) the above in the code as comment to explain why I catch a such generic error.
Line 335:             raise vm.VolumeError("Supervdsm call failed for %s in "
Line 336:                                  "drive: %s" % (device, drive))
Line 337: 
Line 338:         return mkFsFunction(vmId, payload['file'], payload.get('volId'))


-- 
To view, visit http://gerrit.ovirt.org/22928
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3a630d74ec0910c669e0326ad343c5dbea25357e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list