openstack-designate/designate/__init__.py
Omer c1a482a673 Isolate eventlet-dependent services for future migration
This commit creates the structure for migrating Designate
services from using eventlet, to using oslo.service threading backend
(standard/native python threading).

Key changes include:
* Eventlet isolation: existing eventlet-dependent service entrypoints
    (central, mdns, producer, sink, worker, manage, status) are moved
    from designate/cmd to a new designate/cmd/eventlet subdirectory.
* Updating their correct path in setup.cfg.

This prepares the codebase for future incremental migrations of
individual services to native threading.

Change-Id: I67941b5c7525d4b9661b30c4cc03dbd061e86083
Signed-off-by: Omer <oschwart@redhat.com>
2026-01-09 15:07:49 +00:00

42 lines
1.4 KiB
Python

# Copyright 2012 Managed I.T.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import os
# Eventlet's GreenDNS Patching will prevent the resolution of names in
# the /etc/hosts file, causing problems for installs.
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
from oslo_concurrency import lockutils # noqa
from oslo_log import log # noqa
import oslo_messaging as messaging # noqa
BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))
_EXTRA_DEFAULT_LOG_LEVELS = [
'kazoo.client=WARN',
'keystone=INFO',
'oslo_service.loopingcall=WARN',
]
# Set some Oslo Log defaults
log.set_defaults(default_log_levels=log.get_default_log_levels() +
_EXTRA_DEFAULT_LOG_LEVELS)
# Set some Oslo RPC defaults
messaging.set_transport_defaults('designate')
# Set some Oslo Concurrency defaults
lockutils.set_defaults(lock_path='$state_path')