Deprecate local conductor mode
Way back when we started no-db-compute, we introduced the conductor service and provided a "local mode" which made conductor's API layer a passthrough to the manager and thus the database. This eliminated the need to move to conductor for deployments that weren't ready or had other blockers. Now, conductor is a pretty critical part of nova's infrastructure and continuing to allow both modes invites issues (such as bug 1505471). This patch starts the timer on deprecation for this mode of operation so that we can remove it in the future. UpgradeImpact: A deployment mode is being deprecated and will require any existing operators using this to deploy conductor before removal. Change-Id: Ifbd5578dcc53b2117674db2016e5d882a82866aa
This commit is contained in:
@@ -27,7 +27,7 @@ from nova.conductor import rpcapi as conductor_rpcapi
|
||||
from nova import config
|
||||
import nova.db.api
|
||||
from nova import exception
|
||||
from nova.i18n import _LE
|
||||
from nova.i18n import _LE, _LW
|
||||
from nova import objects
|
||||
from nova.objects import base as objects_base
|
||||
from nova import service
|
||||
@@ -37,6 +37,7 @@ from nova import version
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('compute_topic', 'nova.compute.rpcapi')
|
||||
CONF.import_opt('use_local', 'nova.conductor.api', group='conductor')
|
||||
LOG = logging.getLogger('nova.compute')
|
||||
|
||||
|
||||
def block_db_access():
|
||||
@@ -46,7 +47,6 @@ def block_db_access():
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
stacktrace = "".join(traceback.format_stack())
|
||||
LOG = logging.getLogger('nova.compute')
|
||||
LOG.error(_LE('No db access allowed in nova-compute: %s'),
|
||||
stacktrace)
|
||||
raise exception.DBNotAllowed('nova-compute')
|
||||
@@ -66,6 +66,9 @@ def main():
|
||||
block_db_access()
|
||||
objects_base.NovaObject.indirection_api = \
|
||||
conductor_rpcapi.ConductorAPI()
|
||||
else:
|
||||
LOG.warning(_LW('Conductor local mode is deprecated and will '
|
||||
'be removed in a subsequent release'))
|
||||
|
||||
server = service.Service.create(binary='nova-compute',
|
||||
topic=CONF.compute_topic,
|
||||
|
||||
@@ -34,7 +34,7 @@ from nova import config
|
||||
from nova import context
|
||||
import nova.db.api
|
||||
from nova import exception
|
||||
from nova.i18n import _LE
|
||||
from nova.i18n import _LE, _LW
|
||||
from nova.network import rpcapi as network_rpcapi
|
||||
from nova import objects
|
||||
from nova.objects import base as objects_base
|
||||
@@ -126,6 +126,9 @@ def main():
|
||||
block_db_access()
|
||||
objects_base.NovaObject.indirection_api = \
|
||||
conductor_rpcapi.ConductorAPI()
|
||||
else:
|
||||
LOG.warning(_LW('Conductor local mode is deprecated and will '
|
||||
'be removed in a subsequent release'))
|
||||
|
||||
if CONF.action.name in ['add', 'del', 'old']:
|
||||
LOG.debug("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'",
|
||||
|
||||
@@ -27,7 +27,7 @@ from nova.conductor import rpcapi as conductor_rpcapi
|
||||
from nova import config
|
||||
import nova.db.api
|
||||
from nova import exception
|
||||
from nova.i18n import _LE
|
||||
from nova.i18n import _LE, _LW
|
||||
from nova import objects
|
||||
from nova.objects import base as objects_base
|
||||
from nova import service
|
||||
@@ -37,6 +37,7 @@ from nova import version
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('network_topic', 'nova.network.rpcapi')
|
||||
CONF.import_opt('use_local', 'nova.conductor.api', group='conductor')
|
||||
LOG = logging.getLogger('nova.network')
|
||||
|
||||
|
||||
def block_db_access():
|
||||
@@ -46,7 +47,6 @@ def block_db_access():
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
stacktrace = "".join(traceback.format_stack())
|
||||
LOG = logging.getLogger('nova.network')
|
||||
LOG.error(_LE('No db access allowed in nova-network: %s'),
|
||||
stacktrace)
|
||||
raise exception.DBNotAllowed('nova-network')
|
||||
@@ -66,6 +66,9 @@ def main():
|
||||
block_db_access()
|
||||
objects_base.NovaObject.indirection_api = \
|
||||
conductor_rpcapi.ConductorAPI()
|
||||
else:
|
||||
LOG.warning(_LW('Conductor local mode is deprecated and will '
|
||||
'be removed in a subsequent release'))
|
||||
|
||||
server = service.Service.create(binary='nova-network',
|
||||
topic=CONF.network_topic,
|
||||
|
||||
@@ -28,7 +28,12 @@ from nova import utils
|
||||
conductor_opts = [
|
||||
cfg.BoolOpt('use_local',
|
||||
default=False,
|
||||
help='Perform nova-conductor operations locally'),
|
||||
help='DEPRECATED: Perform nova-conductor operations locally. '
|
||||
'This legacy mode was introduced to bridge a gap during '
|
||||
'the transition to the conductor service. It no longer '
|
||||
'represents a reasonable alternative for deployers. '
|
||||
'Removal may be as early as 14.0',
|
||||
deprecated_for_removal=True),
|
||||
cfg.StrOpt('topic',
|
||||
default='conductor',
|
||||
help='The topic on which conductor nodes listen'),
|
||||
|
||||
Reference in New Issue
Block a user