Merge "conf: Remove '[conductor] topic' opt"
This commit is contained in:
commit
9a49767134
nova
releasenotes/notes
@ -21,6 +21,7 @@ from oslo_log import log as logging
|
|||||||
from oslo_reports import guru_meditation_report as gmr
|
from oslo_reports import guru_meditation_report as gmr
|
||||||
from oslo_reports import opts as gmr_opts
|
from oslo_reports import opts as gmr_opts
|
||||||
|
|
||||||
|
from nova.conductor import rpcapi
|
||||||
import nova.conf
|
import nova.conf
|
||||||
from nova import config
|
from nova import config
|
||||||
from nova import objects
|
from nova import objects
|
||||||
@ -42,7 +43,7 @@ def main():
|
|||||||
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
||||||
|
|
||||||
server = service.Service.create(binary='nova-conductor',
|
server = service.Service.create(binary='nova-conductor',
|
||||||
topic=CONF.conductor.topic)
|
topic=rpcapi.RPC_TOPIC)
|
||||||
workers = CONF.conductor.workers or processutils.get_worker_count()
|
workers = CONF.conductor.workers or processutils.get_worker_count()
|
||||||
service.serve(server, workers=workers)
|
service.serve(server, workers=workers)
|
||||||
service.wait()
|
service.wait()
|
||||||
|
@ -31,7 +31,7 @@ class API(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.conductor_rpcapi = rpcapi.ConductorAPI()
|
self.conductor_rpcapi = rpcapi.ConductorAPI()
|
||||||
self.base_rpcapi = baserpc.BaseAPI(topic=CONF.conductor.topic)
|
self.base_rpcapi = baserpc.BaseAPI(topic=rpcapi.RPC_TOPIC)
|
||||||
|
|
||||||
def object_backport_versions(self, context, objinst, object_versions):
|
def object_backport_versions(self, context, objinst, object_versions):
|
||||||
return self.conductor_rpcapi.object_backport_versions(context, objinst,
|
return self.conductor_rpcapi.object_backport_versions(context, objinst,
|
||||||
|
@ -25,6 +25,7 @@ from nova import profiler
|
|||||||
from nova import rpc
|
from nova import rpc
|
||||||
|
|
||||||
CONF = nova.conf.CONF
|
CONF = nova.conf.CONF
|
||||||
|
RPC_TOPIC = 'conductor'
|
||||||
|
|
||||||
|
|
||||||
@profiler.trace_cls("rpc")
|
@profiler.trace_cls("rpc")
|
||||||
@ -211,7 +212,7 @@ class ConductorAPI(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(ConductorAPI, self).__init__()
|
super(ConductorAPI, self).__init__()
|
||||||
target = messaging.Target(topic=CONF.conductor.topic, version='3.0')
|
target = messaging.Target(topic=RPC_TOPIC, version='3.0')
|
||||||
version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.conductor,
|
version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.conductor,
|
||||||
CONF.upgrade_levels.conductor)
|
CONF.upgrade_levels.conductor)
|
||||||
serializer = objects_base.NovaObjectSerializer()
|
serializer = objects_base.NovaObjectSerializer()
|
||||||
@ -284,7 +285,7 @@ class ComputeTaskAPI(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(ComputeTaskAPI, self).__init__()
|
super(ComputeTaskAPI, self).__init__()
|
||||||
target = messaging.Target(topic=CONF.conductor.topic,
|
target = messaging.Target(topic=RPC_TOPIC,
|
||||||
namespace='compute_task',
|
namespace='compute_task',
|
||||||
version='1.0')
|
version='1.0')
|
||||||
serializer = objects_base.NovaObjectSerializer()
|
serializer = objects_base.NovaObjectSerializer()
|
||||||
|
@ -26,19 +26,6 @@ and finally, how many worker processes will be used.
|
|||||||
)
|
)
|
||||||
|
|
||||||
ALL_OPTS = [
|
ALL_OPTS = [
|
||||||
cfg.StrOpt(
|
|
||||||
'topic',
|
|
||||||
default='conductor',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='15.0.0',
|
|
||||||
deprecated_reason="""
|
|
||||||
There is no need to let users choose the RPC topic for all services - there
|
|
||||||
is little gain from this. Furthermore, it makes it really easy to break Nova
|
|
||||||
by using this option.
|
|
||||||
""",
|
|
||||||
help="""
|
|
||||||
Topic exchange name on which conductor nodes listen.
|
|
||||||
"""),
|
|
||||||
cfg.IntOpt(
|
cfg.IntOpt(
|
||||||
'workers',
|
'workers',
|
||||||
help="""
|
help="""
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The ``[conductor] topic`` configuration option was previously deprecated
|
||||||
|
and is now removed from nova. There was no need to let users choose the
|
||||||
|
RPC topics for all services. There was little benefit from this and it made
|
||||||
|
it really easy to break nova by changing the value of topic options.
|
Loading…
x
Reference in New Issue
Block a user