Nir Soffer has posted comments on this change. Change subject: signals: Handle signals to non-main threads ......................................................................
Patch Set 12: (2 comments) Partial review http://gerrit.ovirt.org/#/c/29392/12/vdsm/supervdsmServer File vdsm/supervdsmServer: Line 395: Line 396: Line 397: def main(sockfile, pidfile=None): Line 398: log = logging.getLogger("SuperVdsm.Server") Line 399: sigutils.register() Why not right after importing the module? Using this we could never add tests for main, unless you unregister safely in later (use try finally). Line 400: Line 401: def bind(func): Line 402: def wrapper(_SuperVdsm, *args, **kwargs): Line 403: return func(*args, **kwargs) http://gerrit.ovirt.org/#/c/29392/12/vdsm/vdsm File vdsm/vdsm: Line 64: log.debug("Received signal %s" % signum) Line 65: irs.spmStop( Line 66: irs.getConnectedStoragePoolsList()['poollist'][0]) Line 67: Line 68: sigutils.register() Why not right after importing the module? Using this we could never add tests for main, unless you unregister safely in later (use try finally). Line 69: signal.signal(signal.SIGTERM, sigtermHandler) Line 70: signal.signal(signal.SIGUSR1, sigusr1Handler) Line 71: zombiereaper.registerSignalHandler() Line 72: -- To view, visit http://gerrit.ovirt.org/29392 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5dbcd00cec22ef12f2b6253b016dcbd0aa889583 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dima Kuznetsov <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Dima Kuznetsov <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: mooli tayer <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
