Nir Soffer has posted comments on this change.

Change subject: virt: common handling of exceptions
......................................................................


Patch Set 5:

(3 comments)

https://gerrit.ovirt.org/#/c/54664/5/lib/vdsm/virt/api.py
File lib/vdsm/virt/api.py:

Line 27: 
Line 28: 
Line 29: _log = logging.getLogger("virt.api")
Line 30: 
Line 31: 
> Nice idea, I'm just worried about name clash again:
Sure, we will solve this when needed. Please don't waste time on this now.
Line 32: def method(func):
Line 33:     @wraps(func)
Line 34:     def wrapper(*args, **kwargs):
Line 35: 


Line 30: 
Line 31: 
Line 32: def method(func):
Line 33:     @wraps(func)
Line 34:     def wrapper(*args, **kwargs):
> I will check that, I'm just not sure it will work transparently with plain 
It will not work with plain functions, but we don't care.
Line 35: 
Line 36:         # TODO: maybe add a (cheap) cookie so we can unambiguosly 
correlate
Line 37:         # this START and FINISH log later, so it is easy to compute 
the API
Line 38:         # RTT and other metrics


Line 34:     def wrapper(*args, **kwargs):
Line 35: 
Line 36:         # TODO: maybe add a (cheap) cookie so we can unambiguosly 
correlate
Line 37:         # this START and FINISH log later, so it is easy to compute 
the API
Line 38:         # RTT and other metrics
> OK, so will remove this TODO and go ahead.
But I would consider adding a cookie, can be much easier for manually grepping 
logs and avoid possible errors when processing logs.

Lets convert the todo to trello card?
Line 39:         _log.debug("START %s args=%s kwargs=%s", func.__name__, args, 
kwargs)
Line 40:         try:
Line 41:             # TODO: 'self' argument?
Line 42:             ret = func(*args, **kwargs)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic186dc8fa062d8b3789c6057bba68fbbc23f311b
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to