Disable compute fanout to scheduler
Now that nothing is using publish_service_capabilities it can be disabled, but not removed in order to not break compute rpcapi backwards compatibility. Part of bp no-compute-fanout-to-scheduler. Change-Id: I80c49c46138fd6ee89cb08ffbbced72ada4de72e
This commit is contained in:
@@ -152,13 +152,14 @@ class SchedulerDependentManager(Manager):
|
||||
capabilities = [capabilities]
|
||||
self.last_capabilities = capabilities
|
||||
|
||||
@periodic_task.periodic_task
|
||||
def publish_service_capabilities(self, context):
|
||||
"""Pass data back to the scheduler.
|
||||
|
||||
Called at a periodic interval. And also called via rpc soon after
|
||||
the start of the scheduler.
|
||||
"""
|
||||
#NOTE(jogo): this is now deprecated, unused and can be removed in
|
||||
#V3.0 of compute RPCAPI
|
||||
if self.last_capabilities:
|
||||
LOG.debug(_('Notifying Schedulers of capabilities ...'))
|
||||
self.scheduler_rpcapi.update_service_capabilities(context,
|
||||
|
@@ -29,7 +29,6 @@ from nova.compute import utils as compute_utils
|
||||
from nova.compute import vm_states
|
||||
from nova.conductor import api as conductor_api
|
||||
from nova.conductor.tasks import live_migrate
|
||||
import nova.context
|
||||
from nova import exception
|
||||
from nova import manager
|
||||
from nova.objects import instance as instance_obj
|
||||
@@ -68,16 +67,12 @@ class SchedulerManager(manager.Manager):
|
||||
super(SchedulerManager, self).__init__(service_name='scheduler',
|
||||
*args, **kwargs)
|
||||
|
||||
def post_start_hook(self):
|
||||
"""After we start up and can receive messages via RPC, tell all
|
||||
compute nodes to send us their capabilities.
|
||||
"""
|
||||
ctxt = nova.context.get_admin_context()
|
||||
compute_rpcapi.ComputeAPI().publish_service_capabilities(ctxt)
|
||||
|
||||
def update_service_capabilities(self, context, service_name,
|
||||
host, capabilities):
|
||||
"""Process a capability update from a service node."""
|
||||
#NOTE(jogo) This is deprecated, but is used by the deprecated
|
||||
# publish_service_capabilities call. So this can begin its removal
|
||||
# process once publish_service_capabilities is removed.
|
||||
if not isinstance(capabilities, list):
|
||||
capabilities = [capabilities]
|
||||
for capability in capabilities:
|
||||
|
@@ -125,6 +125,9 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
|
||||
|
||||
def update_service_capabilities(self, ctxt, service_name, host,
|
||||
capabilities):
|
||||
#NOTE(jogo) This is deprecated, but is used by the deprecated
|
||||
# publish_service_capabilities call. So this can begin its removal
|
||||
# process once publish_service_capabilities is removed.
|
||||
self.fanout_cast(ctxt, self.make_msg('update_service_capabilities',
|
||||
service_name=service_name, host=host,
|
||||
capabilities=capabilities),
|
||||
|
Reference in New Issue
Block a user