Adam Litke has uploaded a new change for review.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Log exceptions when calling irs functions from XMLRPC
An earlier change I made introduced a bug in API.py that triggered an exception when calling the 'getDeviceList' XMLRPC call. Unfortunately the server-side exception was not logged anywhere (which made debugging more difficult). This patch adds exception logging for irs methods (note: wrapApiMethod already does this for the other calls).
Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Signed-off-by: Adam Litke agl@us.ibm.com --- M vdsm/BindingXMLRPC.py 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/1575/1 -- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com
Federico Simoncelli has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 161: f.im_self.log.error(traceback.format_exc()) Usually log.error("error message", exc_info=True) is preferred. If traceback wasn't used in wrapApiMethod we could have completely removed the import. Low hanging fruit for anyone interested in cleaning up.
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 162: raise I'm not sure if we want to raise a GeneralException() here. Dan, ideas?
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 162: raise correct - out API never raises exception over xmlrpc, only returns an error code. wrapApiMethod returns errCode['unexpected'] in such a case.
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Adam Litke has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 162: raise The point of the patch is to provide more information about the fault on the server side. Federico requested this since there was a small error in my API series that would have been easier to diagnose if the server-side exception was printed to vdsm.log.
Are you opposed to this extra logging?
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 162: raise I understand the point of the patch, and support it. However, note that in case of an exception in the called function, wrapApiMethod returns an error code, instead of re-raising the exception. I am suggesting to do the same here.
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Adam Litke has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 162: raise Ok I understand and agree. Look for an update of this patch with the suggested change.
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC (V2) ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... File vdsm/BindingXMLRPC.py Line 161: f.im_self.log.error(traceback.format_exc()) Please consider avoiding 'traceback' with exc_info, as requested earlier by Federico.
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC (V3) ......................................................................
Patch Set 3: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Adam Litke has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC (V3) ......................................................................
Patch Set 3: Verified
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Log exceptions when calling irs functions from XMLRPC (V3) ......................................................................
Patch Set 4: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Log exceptions when calling irs functions from XMLRPC (V3) ......................................................................
Log exceptions when calling irs functions from XMLRPC (V3)
Changes since V2: - Use style log.error("error message", exc_info=True) Changes since V1: - Return errcode['unexpected'] instead of raising an exception
An earlier change I made introduced a bug in API.py that triggered an exception when calling the 'getDeviceList' XMLRPC call. Unfortunately the server-side exception was not logged anywhere (which made debugging more difficult). This patch adds exception logging for irs methods (note: wrapApiMethod already does this for the other calls).
Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Signed-off-by: Adam Litke agl@us.ibm.com --- M vdsm/BindingXMLRPC.py 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/1575 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Ifd560d3b110c91f5019c5a6af477926a1fbf1996 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
vdsm-patches@lists.fedorahosted.org