Yaniv Bronhaim has posted comments on this change.
Change subject: Decoupling libvirtconnection.py from clientIF.py
......................................................................
Patch Set 6: (2 inline comments)
we still have "except libvirt.libvirtError" scopes in some locations in the
code, so i wonder, if we catch all kind of libvirtError in one location
(libvirtconnection), can we omit all of those except blocks?
....................................................
File lib/vdsm/libvirtconnection.py
Line 87: libvirt.VIR_FROM_RPC)
Line 88: ECODES = (libvirt.VIR_ERR_SYSTEM_ERROR,
Line 89: libvirt.VIR_ERR_INTERNAL_ERROR,
Line 90: libvirt.VIR_ERR_NO_CONNECT,
Line 91: libvirt.VIR_ERR_INVALID_CONN)
if we already arrange this file, i would move this list of err codes to
separate function that returns this list. it might can bigger if more return
codes will require restart.
Line 92: if edom in EDOMAINS and ecode in ECODES:
Line 93: log.error('connection to libvirt broken.'
Line 94: ' ecode: %d edom: %d', ecode, edom)
Line 95: if killOnFailure:
Line 92: if edom in EDOMAINS and ecode in ECODES:
Line 93: log.error('connection to libvirt broken.'
Line 94: ' ecode: %d edom: %d', ecode, edom)
Line 95: if killOnFailure:
Line 96: log.error('taking calling process down.')
about the log print: its not the calling process, its the current process.
and generally - what if prepareForShutdown takes too long? should we take care
about it? sanlock sends SIGKILL after 40sec. should we do it internally too? or
we should fix prepareForShutdown separately ?
Line 97: os.kill(os.getpid(), signal.SIGTERM)
Line 98: else:
Line 99: log.debug('Unknown libvirterror: ecode: %d edom:
%d '
Line 100: 'level: %d message: %s', ecode, edom,
--
To view, visit http://gerrit.ovirt.org/16393
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibc550ea40ebb3abcf37ebfa59cbf8df8e42daa96
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches