From 8cf635b08a57a9e3be2bef980ef38cf857b6525a Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 29 Aug 2012 09:21:03 +0100 Subject: Stop using scheduler RPC API magic If a scheduler RPC message isn't handled directly by a SchedulerManager method, the __getattr__() fallback passes the message to a driver method in the form of schedule_${method}() and, if that doesn't exist, instead calls the schedule() method supplying the topic and method args. This is pretty bizarre stuff and we appear to only use it in two cases: 1) live_migration - this is how the schedule_live_migration() method in the driver gets called, but the side-effect is that we require the client to pass a topic argument which is never used. This would be much more sanely handled with an explicit SchedulerManager.live_migration() method. 2) create_volume - the volume API asks the scheduler to pick a target host for create_volume() using this method. This would be easily handled with an SchedulerManager.create_volume() method. Change-Id: I1047489d85ac51d8d36fea1c4eb858df638ce349 --- nova/compute/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index c39e588f3..e47147522 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1807,7 +1807,7 @@ class API(base.Base): LOG.debug(_("Going to try to live migrate instance"), instance=instance) self.scheduler_rpcapi.live_migration(context, block_migration, - disk_over_commit, instance, host, topic=FLAGS.compute_topic) + disk_over_commit, instance, host) class HostAPI(base.Base): -- cgit