Example #1
0
def main(args, config):
    start_logging(args)

    signal.signal(signal.SIGQUIT, system_exit_handler)
    signal.signal(signal.SIGABRT, system_exit_handler)
    signal.signal(signal.SIGTERM, system_exit_handler)

    signal.signal(signal.SIGHUP, signal.SIG_IGN)
    signal.signal(signal.SIGUSR1, shutdown_request_handler)

    logger = logging.getLogger('debile')

    if not os.path.isfile(config['keyrings']['pgp']):
        logger.info("Can not find pgp keyring `{file}'".format(
            file=config['keyrings']['pgp']))

    if args.auth_method == 'ssl':
        if not os.path.isfile(config['xmlrpc']['keyfile']):
            logger.error("Can not find ssl keyfile `{file}'".format(
                file=config['xmlrpc']['keyfile']))
        if not os.path.isfile(config['xmlrpc']['certfile']):
            logger.error("Can not find ssl certfile `{file}'".format(
                file=config['xmlrpc']['certfile']))
        if not os.path.isfile(config['keyrings']['ssl']):
            logger.error("Can not find ssl keyring `{file}'".format(
                file=config['keyrings']['ssl']))

    serve(config['xmlrpc']['addr'], config['xmlrpc']['port'], args.auth_method,
          config['xmlrpc'].get('keyfile'), config['xmlrpc'].get('certfile'),
          config['keyrings'].get('ssl'), config["keyrings"].get('pgp'))
Example #2
0
def main(args, config):
    start_logging(args)

    signal.signal(signal.SIGQUIT, system_exit_handler)
    signal.signal(signal.SIGABRT, system_exit_handler)
    signal.signal(signal.SIGTERM, system_exit_handler)

    signal.signal(signal.SIGHUP,  signal.SIG_IGN)
    signal.signal(signal.SIGUSR1, shutdown_request_handler)

    logger = logging.getLogger('debile')

    if not os.path.isfile(config['keyrings']['pgp']):
        logger.info("Can not find pgp keyring `{file}'".format(file=config['keyrings']['pgp']))

    if args.auth_method == 'ssl':
        if not os.path.isfile(config['xmlrpc']['keyfile']):
            logger.error("Can not find ssl keyfile `{file}'".format(file=config['xmlrpc']['keyfile']))
        if not os.path.isfile(config['xmlrpc']['certfile']):
            logger.error("Can not find ssl certfile `{file}'".format(file=config['xmlrpc']['certfile']))
        if not os.path.isfile(config['keyrings']['ssl']):
            logger.error("Can not find ssl keyring `{file}'".format(file=config['keyrings']['ssl']))

    serve(config['xmlrpc']['addr'], config['xmlrpc']['port'],
          args.auth_method,
          config['xmlrpc'].get('keyfile'),
          config['xmlrpc'].get('certfile'),
          config['keyrings'].get('ssl'),
          config["keyrings"].get('pgp'))
Example #3
0
def main(args, config, proxy):
    start_logging(args)

    # Reset the logging config in python-dput and use the global config instead
    dputlog = logging.getLogger('dput')
    dputlog.propagate = True
    dputlog.setLevel(logging.NOTSET)
    while len(dputlog.handlers) > 0:
        dputlog.removeHandler(dputlog.handlers[-1])

    signal.signal(signal.SIGQUIT, system_exit_handler)
    signal.signal(signal.SIGABRT, system_exit_handler)
    signal.signal(signal.SIGTERM, system_exit_handler)

    signal.signal(signal.SIGHUP,  signal.SIG_IGN)
    signal.signal(signal.SIGUSR1, shutdown_request_handler)

    suites = config['suites']
    components = config['components']
    arches = config['arches']
    checks = config.get('checks', list(PLUGINS.keys()))

    while True:
        try:
            with workon(proxy, suites, components, arches, checks) as job:
                run_job(config, job)
            if shutdown_request:
                raise SystemExit(0)
        except KeyboardInterrupt:
            raise SystemExit(1)
        except SystemExit:
            raise
        except:
            if shutdown_request:
                raise SystemExit(0)
            time.sleep(60)
Example #4
0
def main(args, config, proxy):
    start_logging(args)

    # Reset the logging config in python-dput and use the global config instead
    dputlog = logging.getLogger('dput')
    dputlog.propagate = True
    dputlog.setLevel(logging.NOTSET)
    while len(dputlog.handlers) > 0:
        dputlog.removeHandler(dputlog.handlers[-1])

    signal.signal(signal.SIGQUIT, system_exit_handler)
    signal.signal(signal.SIGABRT, system_exit_handler)
    signal.signal(signal.SIGTERM, system_exit_handler)

    signal.signal(signal.SIGHUP,  signal.SIG_IGN)
    signal.signal(signal.SIGUSR1, shutdown_request_handler)

    suites = config['suites']
    components = config['components']
    arches = config['arches']
    checks = config.get('checks', list(PLUGINS.keys()))

    while True:
        try:
            with workon(proxy, suites, components, arches, checks) as job:
                run_job(config, job)
            if shutdown_request:
                raise SystemExit(0)
        except KeyboardInterrupt:
            raise SystemExit(1)
        except SystemExit:
            raise
        except:
            if shutdown_request:
                raise SystemExit(0)
            time.sleep(60)