diff --git a/nova/compute/resource_tracker.py b/nova/compute/resource_tracker.py index 6c47abca9e21..c6860a5d4b55 100644 --- a/nova/compute/resource_tracker.py +++ b/nova/compute/resource_tracker.py @@ -22,10 +22,10 @@ import copy from oslo_log import log as logging from oslo_serialization import jsonutils -from oslo_utils import importutils from nova.compute import claims from nova.compute import monitors +from nova.compute import stats from nova.compute import task_states from nova.compute import vm_states import nova.conf @@ -87,7 +87,7 @@ class ResourceTracker(object): self.pci_tracker = None self.nodename = nodename self.compute_node = None - self.stats = importutils.import_object(CONF.compute_stats_class) + self.stats = stats.Stats() self.tracked_instances = {} self.tracked_migrations = {} monitor_handler = monitors.MonitorHandler(self) diff --git a/nova/conf/compute.py b/nova/conf/compute.py index 7717aee9692d..908d82648047 100644 --- a/nova/conf/compute.py +++ b/nova/conf/compute.py @@ -153,20 +153,6 @@ Possible values: * Any positive integer representing amount of memory in MB to reserve for the host. -"""), - cfg.StrOpt('compute_stats_class', - default='nova.compute.stats.Stats', - deprecated_for_removal=True, - deprecated_since='13.0.0', - help=""" -Abstracts out managing compute host stats to pluggable class. This class -manages and updates stats for the local compute host after an instance -is changed. These configurable compute stats may be useful for a -particular scheduler implementation. - -Possible values - - * A string representing fully qualified class name. """), ] diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 4b61247eee67..90b63a9b7684 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -542,6 +542,8 @@ class Reservation(BASE, NovaBase, models.SoftDeleteMixin): 'QuotaUsage.deleted == 0)') +# TODO(macsz) This class can be removed. It might need a DB migration to drop +# this. class Snapshot(BASE, NovaBase, models.SoftDeleteMixin): """Represents a block storage device that can be attached to a VM.""" __tablename__ = 'snapshots' diff --git a/releasenotes/notes/remove-deprecated-compute-options-dbf2be75d6bdbcc8.yaml b/releasenotes/notes/remove-deprecated-compute-options-dbf2be75d6bdbcc8.yaml new file mode 100644 index 000000000000..1e388cc84ce6 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-compute-options-dbf2be75d6bdbcc8.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The ``compute_stats_class`` options is deprecated and have been removed + from the ``default`` group of nova.conf. \ No newline at end of file