Skip to content

Commit

Permalink
Deprecate the IronicHostManager
Browse files Browse the repository at this point in the history
The use_baremetal_filters and baremetal_enabled_filters options
along with the ExactRamFilter, ExactCoreFilter and ExactDiskFilter
filters were all deprecated in Pike:

  I843353427c90142a366ae9ca63ee4298b4f3ecd4

The IronicHostManager is configurable and relies on those options,
so if those options are deprecated then the IronicHostManager should
also be deprecated.

The sticky part with this is going to be filters that don't work with
ironic nodes today, like the NUMATopologyFilter, so a note is left
in the use_baremetal_filters option code to remind us that we can't
likely remove any of this until all filters work with ironic nodes.

Change-Id: Iebc74a09990dcda8cf0ee2a41f9ae1058d2a182a
  • Loading branch information
mriedem committed Nov 28, 2017
1 parent 14f6674 commit c99fc64
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nova/conf/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
The host manager manages the in-memory picture of the hosts that the scheduler
uses. The options values are chosen from the entry points under the namespace
'nova.scheduler.host_manager' in 'setup.cfg'.
NOTE: The "ironic_host_manager" option is deprecated as of the 17.0.0 Queens
release.
"""),
cfg.StrOpt("driver",
default="filter_scheduler",
Expand Down Expand Up @@ -320,6 +323,10 @@
cfg.BoolOpt("use_baremetal_filters",
deprecated_name="scheduler_use_baremetal_filters",
deprecated_group="DEFAULT",
# NOTE(mriedem): We likely can't remove this option until the
# IronicHostManager is removed, and we likely can't remove that
# until all filters can at least not fail on ironic nodes, like the
# NUMATopologyFilter.
deprecated_for_removal=True,
deprecated_reason="""
These filters were used to overcome some of the baremetal scheduling
Expand Down
8 changes: 8 additions & 0 deletions nova/scheduler/ironic_host_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
subdivided into multiple instances.
"""
from oslo_log import log as logging
from oslo_log import versionutils

import nova.conf
from nova import context as context_module
Expand Down Expand Up @@ -88,6 +89,13 @@ def _locked_consume_from_request(self, spec_obj):
class IronicHostManager(host_manager.HostManager):
"""Ironic HostManager class."""

def __init__(self):
super(IronicHostManager, self).__init__()
msg = ('The IronicHostManager is deprecated and may be removed as '
'early as the 18.0.0 Rocky release. Deployments need to '
'schedule based on resource classes.')
versionutils.report_deprecated_feature(LOG, msg)

@staticmethod
def _is_ironic_compute(compute):
ht = compute.hypervisor_type if 'hypervisor_type' in compute else None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
deprecations:
- |
The `IronicHostManager` is now deprecated along with the
``[scheduler]/host_manager`` option of ``ironic_host_manager``.
As of the 16.0.0 Pike release, the ``ExactRamFilter``, ``ExactCoreFilter``,
and ``ExactDiskFilter`` scheduler filters are all deprecated along with
the ``[scheduler]/use_baremetal_filters`` and
``[scheduler]/baremental_enabled_filters`` options. Deployments should
migrate to using resource classes with baremetal flavors as described in
the ironic install guide:
https://docs.openstack.org/ironic/latest/install/configure-nova-flavors.html#scheduling-based-on-resource-classes
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ nova.ipv6_backend =

nova.scheduler.host_manager =
host_manager = nova.scheduler.host_manager:HostManager
# Deprecated starting from the 17.0.0 Queens release.
ironic_host_manager = nova.scheduler.ironic_host_manager:IronicHostManager

nova.scheduler.driver =
Expand Down

0 comments on commit c99fc64

Please sign in to comment.