]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove deprecated SimpleScheduler
authorMike Perez <thingee@gmail.com>
Mon, 27 Jul 2015 05:46:17 +0000 (22:46 -0700)
committerMike Perez <thingee@gmail.com>
Mon, 27 Jul 2015 06:03:36 +0000 (23:03 -0700)
This has been deprecated for three releases now. It's time! By default
it was already having Cinder use the FilterScheduler with certain
weighers and filters to continue the chance behavior, so definitely not
scary!

Closes-Bug: #1478446
UpgradeImpact: Deprecated SimpleScheduler removed
Change-Id: I10f63bb189b7c894dcc6dccc857cf22698cc5f95

cinder/cmd/all.py
cinder/cmd/api.py
cinder/cmd/backup.py
cinder/cmd/manage.py
cinder/cmd/scheduler.py
cinder/cmd/volume.py
cinder/cmd/volume_usage_audit.py
cinder/scheduler/host_manager.py
cinder/scheduler/manager.py
cinder/tests/unit/integrated/integrated_helpers.py

index b2159b01b9803b716997f2c7c0b87d2e01a17b48..f365ddc672d4ba7716df809359d44e052c67e992 100644 (file)
@@ -29,9 +29,6 @@ import eventlet
 eventlet.monkey_patch()
 
 import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
 
 from oslo_config import cfg
 from oslo_log import log as logging
index 1fbaa055b868b69cd86d608a92574ab62ae68d9a..9057883c5662d2af98bfe76459622c1bdf6c3305 100644 (file)
@@ -21,12 +21,9 @@ import eventlet
 eventlet.monkey_patch()
 
 import sys
-import warnings
 
 from cinder import objects
 
-warnings.simplefilter('once', DeprecationWarning)
-
 from oslo_config import cfg
 from oslo_log import log as logging
 from oslo_reports import guru_meditation_report as gmr
index 888d858f687a9aa437d42cbbfa5c5f2955abae96..cc265e535faad2c1d86c3c3dee46a8a903a74bb5 100644 (file)
@@ -18,9 +18,6 @@
 """Starter script for Cinder Volume Backup."""
 
 import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
 
 import eventlet
 from oslo_config import cfg
index 28690e5d9edda1485fe987f62ea2fb258471ecf3..808b5ec987248f6aca417f1a762160e4db26e5bc 100644 (file)
@@ -57,9 +57,6 @@ from __future__ import print_function
 
 import os
 import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
 
 from oslo_config import cfg
 from oslo_db.sqlalchemy import migration
index 8bbb6f7e49ceadd8cd38ff27ff676595b08602a4..861e3578fe82cd61191ec3c339938eee44a59a4c 100644 (file)
@@ -21,9 +21,6 @@ import eventlet
 eventlet.monkey_patch()
 
 import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
 
 from oslo_config import cfg
 from oslo_log import log as logging
index 3dc6db99028069494387757f1e16c6648748bd4c..c07ea42fa80dadc88c4988f578241faea3d7d92a 100644 (file)
@@ -31,9 +31,6 @@ else:
     eventlet.monkey_patch()
 
 import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
 
 from oslo_config import cfg
 from oslo_log import log as logging
index 38d1fc7d30182f621cda44941e0fb60436017397..5e30980a018be326afa053ff6041690313174505 100644 (file)
@@ -36,9 +36,6 @@ from __future__ import print_function
 
 import datetime
 import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
 
 from oslo_config import cfg
 from oslo_log import log as logging
index af65a4e65a98d117b0c9573e501dc9a872f8bfec..56056931badefa99e6605a1c978c06fff49a45bf 100644 (file)
@@ -357,23 +357,6 @@ class HostManager(object):
                                                         'weights')
         self.weight_classes = self.weight_handler.get_all_classes()
 
-        default_filters = ['AvailabilityZoneFilter',
-                           'CapacityFilter',
-                           'CapabilitiesFilter']
-        chance = 'cinder.scheduler.chance.ChanceScheduler'
-        simple = 'cinder.scheduler.simple.SimpleScheduler'
-        if CONF.scheduler_driver == simple:
-            CONF.set_override('scheduler_default_filters', default_filters)
-            CONF.set_override('scheduler_default_weighers',
-                              ['AllocatedCapacityWeigher'])
-        elif CONF.scheduler_driver == chance:
-            CONF.set_override('scheduler_default_filters', default_filters)
-            CONF.set_override('scheduler_default_weighers',
-                              ['ChanceWeigher'])
-        else:
-            # Do nothing when some other scheduler is configured
-            pass
-
         self._no_capabilities_hosts = set()  # Hosts having no capabilities
         self._update_host_state_map(cinder_context.get_admin_context())
 
index 37a2fcae01f6ce40bf201493034b6ce16bd31c55..87ab67a445b1fbac37f2a9303e115f21474323fc 100644 (file)
@@ -22,7 +22,6 @@ Scheduler Service
 import eventlet
 from oslo_config import cfg
 from oslo_log import log as logging
-from oslo_log import versionutils
 import oslo_messaging as messaging
 from oslo_utils import excutils
 from oslo_utils import importutils
@@ -64,17 +63,6 @@ class SchedulerManager(manager.Manager):
                  *args, **kwargs):
         if not scheduler_driver:
             scheduler_driver = CONF.scheduler_driver
-        if scheduler_driver in ['cinder.scheduler.chance.ChanceScheduler',
-                                'cinder.scheduler.simple.SimpleScheduler']:
-            scheduler_driver = ('cinder.scheduler.filter_scheduler.'
-                                'FilterScheduler')
-            versionutils.report_deprecated_feature(LOG, _(
-                'ChanceScheduler and SimpleScheduler have been '
-                'deprecated due to lack of support for advanced '
-                'features like: volume types, volume encryption,'
-                ' QoS etc. These two schedulers can be fully '
-                'replaced by FilterScheduler with certain '
-                'combination of filters and weighers.'))
         self.driver = importutils.import_object(scheduler_driver)
         super(SchedulerManager, self).__init__(*args, **kwargs)
         self._startup_delay = True
index a3e7ff1c72e8c0fb35472b8c63cbfc3136df0fb9..bfbee797bf3c4ab31382323226fc5ce4e41633f9 100644 (file)
@@ -99,7 +99,8 @@ class _IntegratedTestBase(test.TestCase):
 
         # Use simple scheduler to avoid complications - we test schedulers
         # separately
-        f['scheduler_driver'] = 'cinder.scheduler.simple.SimpleScheduler'
+        f['scheduler_driver'] = ('cinder.scheduler.filter_scheduler.FilterSche'
+                                 'duler')
 
         return f