Yaniv Bronhaim has posted comments on this change.
Change subject: libvirtconnection: ping libvirt upon disconnection ......................................................................
Patch Set 12: Code-Review+1
(1 comment)
I like the new suggestion
.................................................... File lib/vdsm/libvirtconnection.py Line 131: log.debug('trying to connect libvirt') Line 132: conn = utils.retry(libvirtOpenAuth, timeout=10, sleep=0.2) Line 133: __connections[id(target)] = conn Line 134: Line 135: setattr(conn, 'pingLibvirt', getattr(conn, 'getLibVersion')) because then its wrapped as all other conn functions (line 139) and the call to getLibVersion will go through "wrapper" - we will end up with infinite loop that calls to getLibVersion each run of the except logic Line 136: for name in dir(libvirt.virConnect): Line 137: method = getattr(conn, name) Line 138: if callable(method) and name[0] != '_': Line 139: setattr(conn, name, wrapMethod(method))