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
eventlet.monkey_patch()
import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
from oslo_log import log as logging
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
"""Starter script for Cinder Volume Backup."""
import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
import eventlet
from oslo_config import cfg
import os
import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
from oslo_db.sqlalchemy import migration
eventlet.monkey_patch()
import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
from oslo_log import log as logging
eventlet.monkey_patch()
import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
from oslo_log import log as logging
import datetime
import sys
-import warnings
-
-warnings.simplefilter('once', DeprecationWarning)
from oslo_config import cfg
from oslo_log import log as logging
'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())
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
*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
# 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