Merge "Remove deprecated [ilo]/clean_priority_erase_devices config"
This commit is contained in:
commit
c02404089b
@ -383,13 +383,6 @@
|
||||
# Note: This option can be changed without restarting.
|
||||
#debug = false
|
||||
|
||||
# DEPRECATED: If set to false, the logging level will be set
|
||||
# to WARNING instead of the default INFO level. (boolean
|
||||
# value)
|
||||
# This option is deprecated for removal.
|
||||
# Its value may be silently ignored in the future.
|
||||
#verbose = true
|
||||
|
||||
# The name of a logging configuration file. This file is
|
||||
# appended to any existing logging configuration files. For
|
||||
# details about logging configuration files, see the Python
|
||||
@ -1251,14 +1244,6 @@
|
||||
# From oslo.db
|
||||
#
|
||||
|
||||
# DEPRECATED: The file name to use with SQLite. (string value)
|
||||
# Deprecated group/name - [DEFAULT]/sqlite_db
|
||||
# This option is deprecated for removal.
|
||||
# Its value may be silently ignored in the future.
|
||||
# Reason: Should use config option connection or
|
||||
# slave_connection to connect the database.
|
||||
#sqlite_db = oslo.sqlite
|
||||
|
||||
# If True, SQLite uses synchronous mode. (boolean value)
|
||||
# Deprecated group/name - [DEFAULT]/sqlite_synchronous
|
||||
#sqlite_synchronous = true
|
||||
@ -1731,15 +1716,6 @@
|
||||
# (boolean value)
|
||||
#use_web_server_for_images = false
|
||||
|
||||
# DEPRECATED: Priority for erase devices clean step. If unset,
|
||||
# it defaults to 10. If set to 0, the step will be disabled
|
||||
# and will not run during cleaning. (integer value)
|
||||
# This option is deprecated for removal.
|
||||
# Its value may be silently ignored in the future.
|
||||
# Reason: This configuration option is duplicated by [deploy]
|
||||
# erase_devices_priority, please use that instead.
|
||||
#clean_priority_erase_devices = <None>
|
||||
|
||||
# Priority for reset_ilo clean step. (integer value)
|
||||
#clean_priority_reset_ilo = 0
|
||||
|
||||
|
@ -40,14 +40,6 @@ opts = [
|
||||
'is set to False, then Ironic will use Swift '
|
||||
'to host the floppy images and generated '
|
||||
'boot_iso.')),
|
||||
cfg.IntOpt('clean_priority_erase_devices',
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason=_('This configuration option is duplicated '
|
||||
'by [deploy] erase_devices_priority, '
|
||||
'please use that instead.'),
|
||||
help=_('Priority for erase devices clean step. If unset, '
|
||||
'it defaults to 10. If set to 0, the step will be '
|
||||
'disabled and will not run during cleaning.')),
|
||||
cfg.IntOpt('clean_priority_reset_ilo',
|
||||
default=0,
|
||||
help=_('Priority for reset_ilo clean step.')),
|
||||
|
@ -26,7 +26,6 @@ from ironic.common import image_service
|
||||
from ironic.common import states
|
||||
from ironic.conductor import task_manager
|
||||
from ironic.conductor import utils as manager_utils
|
||||
from ironic.conf import CONF
|
||||
from ironic.drivers.modules import agent
|
||||
from ironic.drivers.modules import deploy_utils
|
||||
from ironic.drivers.modules.ilo import boot as ilo_boot
|
||||
@ -303,30 +302,6 @@ class IloVirtualMediaAgentDeploy(agent.AgentDeploy):
|
||||
manager_utils.node_power_action(task, states.POWER_OFF)
|
||||
return super(IloVirtualMediaAgentDeploy, self).prepare_cleaning(task)
|
||||
|
||||
@METRICS.timer('IloVirtualMediaAgentDeploy.get_clean_steps')
|
||||
def get_clean_steps(self, task):
|
||||
"""Get the list of clean steps from the agent.
|
||||
|
||||
:param task: a TaskManager object containing the node
|
||||
:raises NodeCleaningFailure: if the clean steps are not yet
|
||||
available (cached), for example, when a node has just been
|
||||
enrolled and has not been cleaned yet.
|
||||
:returns: A list of clean step dictionaries
|
||||
"""
|
||||
|
||||
priority = CONF.ilo.clean_priority_erase_devices
|
||||
if priority is None:
|
||||
priority = CONF.deploy.erase_devices_priority
|
||||
|
||||
new_priorities = {
|
||||
'erase_devices': priority,
|
||||
'erase_devices_metadata':
|
||||
CONF.deploy.erase_devices_metadata_priority,
|
||||
}
|
||||
return deploy_utils.agent_get_clean_steps(
|
||||
task, interface='deploy',
|
||||
override_priorities=new_priorities)
|
||||
|
||||
@METRICS.timer('IloVirtualMediaAgentDeploy.reboot_to_instance')
|
||||
def reboot_to_instance(self, task):
|
||||
node = task.node
|
||||
|
@ -27,7 +27,6 @@ from ironic.conductor import task_manager
|
||||
from ironic.conductor import utils as manager_utils
|
||||
from ironic.conf import CONF
|
||||
from ironic.drivers.modules import agent
|
||||
from ironic.drivers.modules import deploy_utils
|
||||
from ironic.drivers.modules.ilo import common as ilo_common
|
||||
from ironic.drivers.modules.ilo import deploy as ilo_deploy
|
||||
from ironic.drivers.modules import iscsi_deploy
|
||||
@ -510,61 +509,6 @@ class IloVirtualMediaAgentDeployTestCase(db_base.DbTestCase):
|
||||
self.assertFalse(func_prepare_node_for_deploy.called)
|
||||
agent_prepare_mock.assert_called_once_with(mock.ANY, task)
|
||||
|
||||
@mock.patch.object(deploy_utils, 'agent_get_clean_steps', spec_set=True,
|
||||
autospec=True)
|
||||
def test_get_clean_steps_with_conf_option(self, get_clean_step_mock):
|
||||
self.config(clean_priority_erase_devices=20, group='ilo')
|
||||
self.config(erase_devices_metadata_priority=10, group='deploy')
|
||||
get_clean_step_mock.return_value = [{
|
||||
'step': 'erase_devices',
|
||||
'priority': 10,
|
||||
'interface': 'deploy',
|
||||
'reboot_requested': False
|
||||
}]
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
task.driver.deploy.get_clean_steps(task)
|
||||
get_clean_step_mock.assert_called_once_with(
|
||||
task, interface='deploy',
|
||||
override_priorities={'erase_devices': 20,
|
||||
'erase_devices_metadata': 10})
|
||||
|
||||
@mock.patch.object(deploy_utils, 'agent_get_clean_steps', spec_set=True,
|
||||
autospec=True)
|
||||
def test_get_clean_steps_erase_devices_disable(self, get_clean_step_mock):
|
||||
self.config(clean_priority_erase_devices=0, group='ilo')
|
||||
self.config(erase_devices_metadata_priority=0, group='deploy')
|
||||
get_clean_step_mock.return_value = [{
|
||||
'step': 'erase_devices',
|
||||
'priority': 10,
|
||||
'interface': 'deploy',
|
||||
'reboot_requested': False
|
||||
}]
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
task.driver.deploy.get_clean_steps(task)
|
||||
get_clean_step_mock.assert_called_once_with(
|
||||
task, interface='deploy',
|
||||
override_priorities={'erase_devices': 0,
|
||||
'erase_devices_metadata': 0})
|
||||
|
||||
@mock.patch.object(deploy_utils, 'agent_get_clean_steps', spec_set=True,
|
||||
autospec=True)
|
||||
def test_get_clean_steps_without_conf_option(self, get_clean_step_mock):
|
||||
get_clean_step_mock.return_value = [{
|
||||
'step': 'erase_devices',
|
||||
'priority': 10,
|
||||
'interface': 'deploy',
|
||||
'reboot_requested': False
|
||||
}]
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
shared=False) as task:
|
||||
task.driver.deploy.get_clean_steps(task)
|
||||
get_clean_step_mock.assert_called_once_with(
|
||||
task, interface='deploy',
|
||||
override_priorities={'erase_devices': None,
|
||||
'erase_devices_metadata': None})
|
||||
|
||||
@mock.patch.object(agent.AgentDeploy, 'prepare_cleaning', spec_set=True,
|
||||
autospec=True)
|
||||
@mock.patch.object(manager_utils, 'node_power_action', spec_set=True,
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The configuration option ``[ilo]/clean_priority_erase_devices`` was
|
||||
deprecated in the Newton cycle (6.1.0). It is no longer supported. Please
|
||||
use the option ``[deploy]/erase_devices_priority`` instead.
|
Loading…
Reference in New Issue
Block a user