Change in vdsm[master]: hsm: Resizing the device if needed in getDeviceList
nsoffer at redhat.com
nsoffer at redhat.com
Sun May 10 11:56:34 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: hsm: Resizing the device if needed in getDeviceList
......................................................................
Patch Set 7:
(2 comments)
https://gerrit.ovirt.org/#/c/40469/7/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:
Line 2048: try:
Line 2049: if multipath.resize_if_needed(dev["guid"]):
Line 2050: dev["capacity"] = str(multipath.getDeviceSize(dev["dm"]))
Line 2051: except Exception as err:
Line 2052: self.log.exception("Could not resize device:%s dm :%s %s",
Lets use same style of message you added in the other patches:
Could not resize device %r (dm=%s)
Line 2053: dev["guid"], dev["dm"], err)
Line 2054:
Line 2055: pv = pvs.get(dev.get('guid', ""))
Line 2056: if pv is not None:
Line 2049: if multipath.resize_if_needed(dev["guid"]):
Line 2050: dev["capacity"] = str(multipath.getDeviceSize(dev["dm"]))
Line 2051: except Exception as err:
Line 2052: self.log.exception("Could not resize device:%s dm :%s %s",
Line 2053: dev["guid"], dev["dm"], err)
err is displayed as part of the traceback - the last line in the traceback is err.
So we can simply do:
except Exception:
log.exception(...)
Line 2054:
Line 2055: pv = pvs.get(dev.get('guid', ""))
Line 2056: if pv is not None:
Line 2057: pvuuid = pv.uuid
--
To view, visit https://gerrit.ovirt.org/40469
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6b1b699b1a905e949e98f435f339a21dad640c6
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list