Ejemplo n.º 1
0
def main():
    utils.read_config('designate', sys.argv)
    logging.setup(CONF, 'designate')
    gmr.TextGuruMeditation.setup_autorun(version)

    hookpoints.log_hook_setup()

    server = worker_service.Service()
    heartbeat = service.Heartbeat(server.service_name, server.tg)
    service.serve(server, workers=CONF['service:worker'].workers)
    heartbeat.start()
    service.wait()
Ejemplo n.º 2
0
def main():
    utils.read_config('designate', sys.argv)
    logging.setup(CONF, 'designate')
    gmr.TextGuruMeditation.setup_autorun(version)

    # NOTE(timsim): This is to ensure people don't start the wrong
    #               services when the worker model is enabled.
    if not cfg.CONF['service:worker'].enabled:
        LOG.error(_LE('You do not have designate-worker enabled, starting '
                      'designate-worker is not allowed. '
                      'You need to start designate-pool-manager instead.'))
        sys.exit(1)

    hookpoints.log_hook_setup()

    server = worker_service.Service(threads=CONF['service:worker'].threads)
    service.serve(server, workers=CONF['service:worker'].workers)
    service.wait()
Ejemplo n.º 3
0
 def setUp(self):
     self.context = mock.Mock()
     self.zone = mock.Mock()
     self.service = service.Service()