Merge "conf: Remove deprecated service manager opts"
This commit is contained in:
commit
92c251f85f
@ -40,8 +40,7 @@ def main():
|
|||||||
gmr.TextGuruMeditation.setup_autorun(version)
|
gmr.TextGuruMeditation.setup_autorun(version)
|
||||||
|
|
||||||
server = service.Service.create(binary='nova-conductor',
|
server = service.Service.create(binary='nova-conductor',
|
||||||
topic=CONF.conductor.topic,
|
topic=CONF.conductor.topic)
|
||||||
manager=CONF.conductor.manager)
|
|
||||||
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()
|
||||||
|
@ -56,6 +56,7 @@ def main():
|
|||||||
LOG.warning(_LW('Nova network is deprecated and will be removed '
|
LOG.warning(_LW('Nova network is deprecated and will be removed '
|
||||||
'in the future'))
|
'in the future'))
|
||||||
server = service.Service.create(binary='nova-network',
|
server = service.Service.create(binary='nova-network',
|
||||||
topic=CONF.network_topic)
|
topic=CONF.network_topic,
|
||||||
|
manager=CONF.network_manager)
|
||||||
service.serve(server)
|
service.serve(server)
|
||||||
service.wait()
|
service.wait()
|
||||||
|
@ -38,16 +38,6 @@ by using this option.
|
|||||||
""",
|
""",
|
||||||
help="""
|
help="""
|
||||||
Topic exchange name on which conductor nodes listen.
|
Topic exchange name on which conductor nodes listen.
|
||||||
"""),
|
|
||||||
cfg.StrOpt(
|
|
||||||
'manager',
|
|
||||||
default='nova.conductor.manager.ConductorManager',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='13.0.0',
|
|
||||||
help="""
|
|
||||||
Full class name for the Manager for conductor.
|
|
||||||
|
|
||||||
Removal in 14.0
|
|
||||||
"""),
|
"""),
|
||||||
cfg.IntOpt(
|
cfg.IntOpt(
|
||||||
'workers',
|
'workers',
|
||||||
|
@ -125,11 +125,6 @@ Possible Values:
|
|||||||
* Any positive integer
|
* Any positive integer
|
||||||
* None (default value)
|
* None (default value)
|
||||||
"""),
|
"""),
|
||||||
cfg.StrOpt('metadata_manager',
|
|
||||||
default='nova.api.manager.MetadataManager',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='13.0.0',
|
|
||||||
help="Full class name for the service metadata manager."),
|
|
||||||
cfg.StrOpt('metadata_listen',
|
cfg.StrOpt('metadata_listen',
|
||||||
default="0.0.0.0",
|
default="0.0.0.0",
|
||||||
help="""
|
help="""
|
||||||
@ -169,21 +164,6 @@ Possible Values:
|
|||||||
deprecated_for_removal=True,
|
deprecated_for_removal=True,
|
||||||
deprecated_since='13.0.0',
|
deprecated_since='13.0.0',
|
||||||
help='Full class name for the Manager for compute'),
|
help='Full class name for the Manager for compute'),
|
||||||
cfg.StrOpt('console_manager',
|
|
||||||
default='nova.console.manager.ConsoleProxyManager',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='13.0.0',
|
|
||||||
help='Full class name for the Manager for console proxy'),
|
|
||||||
cfg.StrOpt('consoleauth_manager',
|
|
||||||
default='nova.consoleauth.manager.ConsoleAuthManager',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='13.0.0',
|
|
||||||
help='Full class name for the Manager for console auth'),
|
|
||||||
cfg.StrOpt('cert_manager',
|
|
||||||
default='nova.cert.manager.CertManager',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='13.0.0',
|
|
||||||
help='Full class name for the Manager for cert'),
|
|
||||||
# NOTE(sdague): the network_manager has a bunch of different in
|
# NOTE(sdague): the network_manager has a bunch of different in
|
||||||
# tree classes that are still legit options. In Newton we should
|
# tree classes that are still legit options. In Newton we should
|
||||||
# turn this into a selector.
|
# turn this into a selector.
|
||||||
@ -195,11 +175,6 @@ Possible Values:
|
|||||||
],
|
],
|
||||||
default='nova.network.manager.VlanManager',
|
default='nova.network.manager.VlanManager',
|
||||||
help='Full class name for the Manager for network'),
|
help='Full class name for the Manager for network'),
|
||||||
cfg.StrOpt('scheduler_manager',
|
|
||||||
default='nova.scheduler.manager.SchedulerManager',
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
deprecated_since='13.0.0',
|
|
||||||
help='Full class name for the Manager for scheduler'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,6 +47,16 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
CONF = nova.conf.CONF
|
CONF = nova.conf.CONF
|
||||||
|
|
||||||
|
SERVICE_MANAGERS = {
|
||||||
|
'nova-console': 'nova.console.manager.ConsoleProxyManager',
|
||||||
|
'nova-consoleauth': 'nova.consoleauth.manager.ConsoleAuthManager',
|
||||||
|
'nova-cert': 'nova.cert.manager.CertManager',
|
||||||
|
'nova-conductor': 'nova.conductor.manager.ConductorManager',
|
||||||
|
'nova-metadata': 'nova.api.manager.MetadataManager',
|
||||||
|
'nova-scheduler': 'nova.scheduler.manager.SchedulerManager',
|
||||||
|
'nova-cells': 'nova.cells.manager.CellsManager',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def _create_service_ref(this_service, context):
|
def _create_service_ref(this_service, context):
|
||||||
service = objects.Service(context)
|
service = objects.Service(context)
|
||||||
@ -197,9 +207,11 @@ class Service(service.Service):
|
|||||||
if not topic:
|
if not topic:
|
||||||
topic = binary.rpartition('nova-')[2]
|
topic = binary.rpartition('nova-')[2]
|
||||||
if not manager:
|
if not manager:
|
||||||
manager_cls = ('%s_manager' %
|
manager = SERVICE_MANAGERS.get(binary)
|
||||||
binary.rpartition('nova-')[2])
|
if manager is None:
|
||||||
manager = CONF.get(manager_cls, None)
|
manager_cls = ('%s_manager' %
|
||||||
|
binary.rpartition('nova-')[2])
|
||||||
|
manager = CONF.get(manager_cls, None)
|
||||||
if report_interval is None:
|
if report_interval is None:
|
||||||
report_interval = CONF.report_interval
|
report_interval = CONF.report_interval
|
||||||
if periodic_enable is None:
|
if periodic_enable is None:
|
||||||
@ -330,15 +342,11 @@ class WSGIService(service.Service):
|
|||||||
:returns: a Manager instance, or None.
|
:returns: a Manager instance, or None.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
fl = '%s_manager' % self.name
|
manager = SERVICE_MANAGERS.get(self.binary)
|
||||||
if fl not in CONF:
|
if manager is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
manager_class_name = CONF.get(fl, None)
|
manager_class = importutils.import_class(manager)
|
||||||
if not manager_class_name:
|
|
||||||
return None
|
|
||||||
|
|
||||||
manager_class = importutils.import_class(manager_class_name)
|
|
||||||
return manager_class()
|
return manager_class()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
@ -94,8 +94,7 @@ class _IntegratedTestBase(test.TestCase):
|
|||||||
return self.start_service('scheduler')
|
return self.start_service('scheduler')
|
||||||
|
|
||||||
def _setup_services(self):
|
def _setup_services(self):
|
||||||
self.conductor = self.start_service('conductor',
|
self.conductor = self.start_service('conductor')
|
||||||
manager=CONF.conductor.manager)
|
|
||||||
self.compute = self._setup_compute_service()
|
self.compute = self._setup_compute_service()
|
||||||
self.consoleauth = self.start_service('consoleauth')
|
self.consoleauth = self.start_service('consoleauth')
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ class NotificationSampleTestBase(test.TestCase,
|
|||||||
nova.tests.unit.image.fake.stub_out_image_service(self)
|
nova.tests.unit.image.fake.stub_out_image_service(self)
|
||||||
self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)
|
self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)
|
||||||
|
|
||||||
self.start_service('conductor', manager=CONF.conductor.manager)
|
self.start_service('conductor')
|
||||||
self.start_service('scheduler')
|
self.start_service('scheduler')
|
||||||
self.start_service('network')
|
self.start_service('network')
|
||||||
self.compute = self.start_service('compute')
|
self.compute = self.start_service('compute')
|
||||||
|
@ -40,7 +40,7 @@ class TestServerGet(test.TestCase):
|
|||||||
# the image fake backend needed for image discovery
|
# the image fake backend needed for image discovery
|
||||||
nova.tests.unit.image.fake.stub_out_image_service(self)
|
nova.tests.unit.image.fake.stub_out_image_service(self)
|
||||||
|
|
||||||
self.start_service('conductor', manager=CONF.conductor.manager)
|
self.start_service('conductor')
|
||||||
self.flags(driver='chance_scheduler', group='scheduler')
|
self.flags(driver='chance_scheduler', group='scheduler')
|
||||||
self.start_service('scheduler')
|
self.start_service('scheduler')
|
||||||
self.network = self.start_service('network')
|
self.network = self.start_service('network')
|
||||||
|
@ -48,7 +48,7 @@ class TestServerGet(test.TestCase):
|
|||||||
# the image fake backend needed for image discovery
|
# the image fake backend needed for image discovery
|
||||||
nova.tests.unit.image.fake.stub_out_image_service(self)
|
nova.tests.unit.image.fake.stub_out_image_service(self)
|
||||||
|
|
||||||
self.start_service('conductor', manager=CONF.conductor.manager)
|
self.start_service('conductor')
|
||||||
self.flags(driver='chance_scheduler', group='scheduler')
|
self.flags(driver='chance_scheduler', group='scheduler')
|
||||||
self.start_service('scheduler')
|
self.start_service('scheduler')
|
||||||
self.network = self.start_service('network')
|
self.network = self.start_service('network')
|
||||||
|
@ -67,7 +67,7 @@ class TestSerialConsoleLiveMigrate(test.TestCase):
|
|||||||
self.flags(use_usb_tablet=False, group="libvirt")
|
self.flags(use_usb_tablet=False, group="libvirt")
|
||||||
self.flags(host="test_compute1")
|
self.flags(host="test_compute1")
|
||||||
|
|
||||||
self.start_service('conductor', manager=CONF.conductor.manager)
|
self.start_service('conductor')
|
||||||
self.flags(driver='chance_scheduler', group='scheduler')
|
self.flags(driver='chance_scheduler', group='scheduler')
|
||||||
self.start_service('scheduler')
|
self.start_service('scheduler')
|
||||||
self.network = self.start_service('network')
|
self.network = self.start_service('network')
|
||||||
|
@ -30,8 +30,7 @@ class ComputeManagerTestCase(test.TestCase):
|
|||||||
super(ComputeManagerTestCase, self).setUp()
|
super(ComputeManagerTestCase, self).setUp()
|
||||||
self.useFixture(fixtures.SpawnIsSynchronousFixture())
|
self.useFixture(fixtures.SpawnIsSynchronousFixture())
|
||||||
self.useFixture(cast_as_call.CastAsCall(self.stubs))
|
self.useFixture(cast_as_call.CastAsCall(self.stubs))
|
||||||
self.conductor = self.start_service('conductor',
|
self.conductor = self.start_service('conductor')
|
||||||
manager=CONF.conductor.manager)
|
|
||||||
self.start_service('scheduler')
|
self.start_service('scheduler')
|
||||||
self.compute = self.start_service('compute')
|
self.compute = self.start_service('compute')
|
||||||
self.context = context.RequestContext('fake', 'fake')
|
self.context = context.RequestContext('fake', 'fake')
|
||||||
|
@ -82,7 +82,7 @@ class ServerGroupTestBase(test.TestCase,
|
|||||||
# the image fake backend needed for image discovery
|
# the image fake backend needed for image discovery
|
||||||
nova.tests.unit.image.fake.stub_out_image_service(self)
|
nova.tests.unit.image.fake.stub_out_image_service(self)
|
||||||
|
|
||||||
self.start_service('conductor', manager=CONF.conductor.manager)
|
self.start_service('conductor')
|
||||||
self.start_service('scheduler')
|
self.start_service('scheduler')
|
||||||
|
|
||||||
self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)
|
self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
"""Tests For Console proxy."""
|
"""Tests For Console proxy."""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
from oslo_utils import importutils
|
|
||||||
|
|
||||||
from nova.compute import rpcapi as compute_rpcapi
|
from nova.compute import rpcapi as compute_rpcapi
|
||||||
import nova.conf
|
import nova.conf
|
||||||
from nova.console import api as console_api
|
from nova.console import api as console_api
|
||||||
|
from nova.console import manager as console_manager
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova import db
|
from nova import db
|
||||||
from nova import exception
|
from nova import exception
|
||||||
@ -37,7 +37,7 @@ class ConsoleTestCase(test.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ConsoleTestCase, self).setUp()
|
super(ConsoleTestCase, self).setUp()
|
||||||
self.flags(console_driver='nova.console.fake.FakeConsoleProxy')
|
self.flags(console_driver='nova.console.fake.FakeConsoleProxy')
|
||||||
self.console = importutils.import_object(CONF.console_manager)
|
self.console = console_manager.ConsoleProxyManager()
|
||||||
self.user_id = 'fake'
|
self.user_id = 'fake'
|
||||||
self.project_id = 'fake'
|
self.project_id = 'fake'
|
||||||
self.context = context.RequestContext(self.user_id, self.project_id)
|
self.context = context.RequestContext(self.user_id, self.project_id)
|
||||||
|
@ -34,8 +34,7 @@ class BaseAPITestCase(test.TestCase):
|
|||||||
self.project_id = 'fake'
|
self.project_id = 'fake'
|
||||||
self.context = context.RequestContext(self.user_id,
|
self.context = context.RequestContext(self.user_id,
|
||||||
self.project_id)
|
self.project_id)
|
||||||
self.conductor = self.start_service(
|
self.conductor = self.start_service('conductor')
|
||||||
'conductor', manager=CONF.conductor.manager)
|
|
||||||
self.compute = self.start_service('compute')
|
self.compute = self.start_service('compute')
|
||||||
self.base_rpcapi = baserpc.BaseAPI(CONF.compute_topic)
|
self.base_rpcapi = baserpc.BaseAPI(CONF.compute_topic)
|
||||||
|
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The concept that ``service manager`` were replaceable
|
||||||
|
components was deprecated in Mitaka, so following config
|
||||||
|
options are removed.
|
||||||
|
|
||||||
|
- ``metadata_manager``
|
||||||
|
- ``console_manager``
|
||||||
|
- ``consoleauth_manager``
|
||||||
|
- ``cert_manager``
|
||||||
|
- ``scheduler_manager``
|
||||||
|
- ``conductor.manager``
|
||||||
|
|
Loading…
Reference in New Issue
Block a user