Dan Kenigsberg has posted comments on this change.

Change subject: network: clientSeen should have it's default timeout
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.ovirt.org/#/c/40087/1//COMMIT_MSG
Commit Message:

Line 3: AuthorDate: 2015-04-21 12:27:50 +0300
Line 4: Commit:     Ido Barkan <ibar...@redhat.com>
Line 5: CommitDate: 2015-04-21 16:03:10 +0300
Line 6: 
Line 7: network: clientSeen should have it's default timeout
it's -> its
Line 8: 
Line 9: Change-Id: Ibe5e28247bebd91878c2a2c687b2eeb9bfec6586


https://gerrit.ovirt.org/#/c/40087/1/vdsm/network/api.py
File vdsm/network/api.py:

Line 513: 
Line 514: 
Line 515: def clientSeen(timeout=CONNECTIVITY_TIMEOUT_DEFAULT):
Line 516:     start = time.time()
Line 517:     while timeout >= 0:
this explodes if timeout is None. Hence the frightening catching-all except of 
line 729 does not remove the exception, only hides its origin.

Better have here

  if timeout is None:
     timeout = CONNECTIVITY_TIMEOUT_DEFAULT

or move this logic into your new _get_connectivity_timeout
Line 518:         try:
Line 519:             if os.stat(constants.P_VDSM_CLIENT_LOG).st_mtime > start:
Line 520:                 return True
Line 521:         except OSError as e:


Line 724: 
Line 725: def _get_connectivity_timeout(options):
Line 726:     try:
Line 727:         return int(options.get('connectivityTimeout'))
Line 728:     except:
We must never swallow exception without a trace. Particularly in this case, 
when we got garbage from Engine.

I prefer fully-blown traceback in such conditions.
Line 729:         return None
Line 730: 
Line 731: 
Line 732: def _check_connectivity(connectivity_check_networks, networks, 
bondings,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe5e28247bebd91878c2a2c687b2eeb9bfec6586
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibar...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvob...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to