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 cfg.CONF['service:worker'].enabled: LOG.error( _LE('You have designate-worker enabled, starting ' 'designate-pool-manager is incompatible with ' 'designate-worker. You need to start ' 'designate-worker instead.')) sys.exit(1) LOG.warning( _LW('designate-pool-manager is DEPRECATED in favor of ' 'designate-worker and will be removed during the Ocata ' 'cycle')) server = pool_manager_service.Service( threads=CONF['service:pool_manager'].threads) hookpoints.log_hook_setup() service.serve(server, workers=CONF['service:pool_manager'].workers) service.wait()
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 CONF['service:worker'].enabled: LOG.error('You have designate-worker enabled, starting ' 'designate-pool-manager is incompatible with ' 'designate-worker. You need to start ' 'designate-worker instead.') sys.exit(1) debtcollector.deprecate( 'designate-pool-manager is deprecated in favor of ' 'designate-worker', version='newton', removal_version='rocky') server = pool_manager_service.Service( threads=CONF['service:pool_manager'].threads) hookpoints.log_hook_setup() service.serve(server, workers=CONF['service:pool_manager'].workers) server.heartbeat_emitter.start() service.wait()
def test_pool_manager_rpc_topic(self): CONF.set_override('topic', 'test-topic', 'service:pool_manager') self.service = service.Service() self.assertEqual('test-topic.794ccc2c-d751-44fe-b57f-8894c9f5c842', self.service._rpc_topic) self.assertEqual('pool_manager', self.service.service_name)
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) server = pool_manager_service.Service() service.serve(server, workers=CONF['service:pool_manager'].workers) service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') gmr.TextGuruMeditation.setup_autorun(version) server = pool_manager_service.Service( threads=CONF['service:pool_manager'].threads) hookpoints.log_hook_setup() service.serve(server, workers=CONF['service:pool_manager'].workers) service.wait()
def setUp(self): super(PoolManagerTest, self).setUp() self.context = self.get_context() self.zone = objects.Zone( name="example.com.", type="PRIMARY", email="*****@*****.**", serial=1, ) self.service = service.Service() self.service.tg.add_timer = mock.Mock() self.service.pool = mock.Mock() setattr(self.service.pool, 'targets', ()) setattr(self.service.pool, 'also_notifies', ()) setattr(self.service.pool, 'nameservers', ()) self.service._pool_election = mock.Mock() self.service.target_backends = {}
def setUp(self): super(PoolManagerInitTest, self).setUp() self.useFixture(cfg_fixture.Config(CONF)) self.service = service.Service()