Mark more configuration options as reloadable

I have only checked the main configuration options and two generic
drivers, leaving everything else untouched. Added are options
that is possible and makes sense to reload.

Change-Id: I74c629bcaf50da7f829f0ec8c526d936b9d40b36
This commit is contained in:
Dmitry Tantsur 2020-05-06 15:21:05 +02:00
parent b889daccc2
commit 50c81cdbc9
14 changed files with 128 additions and 1 deletions

View File

@ -28,6 +28,7 @@ opts = [
'ramdisk.')), 'ramdisk.')),
cfg.IntOpt('memory_consumed_by_agent', cfg.IntOpt('memory_consumed_by_agent',
default=0, default=0,
mutable=True,
help=_('The memory size in MiB consumed by agent when it is ' help=_('The memory size in MiB consumed by agent when it is '
'booted on a bare metal node. This is used for ' 'booted on a bare metal node. This is used for '
'checking if the image can be downloaded and deployed ' 'checking if the image can be downloaded and deployed '
@ -36,6 +37,7 @@ opts = [
'the agent ramdisk image.')), 'the agent ramdisk image.')),
cfg.BoolOpt('stream_raw_images', cfg.BoolOpt('stream_raw_images',
default=True, default=True,
mutable=True,
help=_('Whether the agent ramdisk should stream raw images ' help=_('Whether the agent ramdisk should stream raw images '
'directly onto the disk or not. By streaming raw ' 'directly onto the disk or not. By streaming raw '
'images directly onto the disk the agent ramdisk will ' 'images directly onto the disk the agent ramdisk will '
@ -63,6 +65,7 @@ opts = [
'failure')), 'failure')),
('never', _('never collect logs'))], ('never', _('never collect logs'))],
default='on_failure', default='on_failure',
mutable=True,
help=_('Whether Ironic should collect the deployment logs on ' help=_('Whether Ironic should collect the deployment logs on '
'deployment failure (on_failure), always or never.')), 'deployment failure (on_failure), always or never.')),
cfg.StrOpt('deploy_logs_storage_backend', cfg.StrOpt('deploy_logs_storage_backend',
@ -70,20 +73,24 @@ opts = [
('swift', _('store the logs in Object Storage ' ('swift', _('store the logs in Object Storage '
'service'))], 'service'))],
default='local', default='local',
mutable=True,
help=_('The name of the storage backend where the logs ' help=_('The name of the storage backend where the logs '
'will be stored.')), 'will be stored.')),
cfg.StrOpt('deploy_logs_local_path', cfg.StrOpt('deploy_logs_local_path',
default='/var/log/ironic/deploy', default='/var/log/ironic/deploy',
mutable=True,
help=_('The path to the directory where the logs should be ' help=_('The path to the directory where the logs should be '
'stored, used when the deploy_logs_storage_backend ' 'stored, used when the deploy_logs_storage_backend '
'is configured to "local".')), 'is configured to "local".')),
cfg.StrOpt('deploy_logs_swift_container', cfg.StrOpt('deploy_logs_swift_container',
default='ironic_deploy_logs_container', default='ironic_deploy_logs_container',
mutable=True,
help=_('The name of the Swift container to store the logs, ' help=_('The name of the Swift container to store the logs, '
'used when the deploy_logs_storage_backend is ' 'used when the deploy_logs_storage_backend is '
'configured to "swift".')), 'configured to "swift".')),
cfg.IntOpt('deploy_logs_swift_days_to_expire', cfg.IntOpt('deploy_logs_swift_days_to_expire',
default=30, default=30,
mutable=True,
help=_('Number of days before a log object is marked as ' help=_('Number of days before a log object is marked as '
'expired in Swift. If None, the logs will be kept ' 'expired in Swift. If None, the logs will be kept '
'forever or until manually deleted. Used when the ' 'forever or until manually deleted. Used when the '
@ -96,6 +103,7 @@ opts = [
'from HTTP service served at conductor ' 'from HTTP service served at conductor '
'nodes.'))], 'nodes.'))],
default='swift', default='swift',
mutable=True,
help=_('Specifies whether direct deploy interface should try ' help=_('Specifies whether direct deploy interface should try '
'to use the image source directly or if ironic should ' 'to use the image source directly or if ironic should '
'cache the image on the conductor and serve it from ' 'cache the image on the conductor and serve it from '
@ -104,6 +112,7 @@ opts = [
'service.')), 'service.')),
cfg.IntOpt('command_timeout', cfg.IntOpt('command_timeout',
default=60, default=60,
mutable=True,
help=_('Timeout (in seconds) for IPA commands. ' help=_('Timeout (in seconds) for IPA commands. '
'Please note, the bootloader installation command ' 'Please note, the bootloader installation command '
'to the agent is permitted a timeout of twice the ' 'to the agent is permitted a timeout of twice the '
@ -116,6 +125,7 @@ opts = [
'problems.')), 'problems.')),
cfg.IntOpt('neutron_agent_poll_interval', cfg.IntOpt('neutron_agent_poll_interval',
default=2, default=2,
mutable=True,
help=_('The number of seconds Neutron agent will wait between ' help=_('The number of seconds Neutron agent will wait between '
'polling for device changes. This value should be ' 'polling for device changes. This value should be '
'the same as CONF.AGENT.polling_interval in Neutron ' 'the same as CONF.AGENT.polling_interval in Neutron '

View File

@ -28,9 +28,11 @@ opts = [
help=_('The TCP port on which ironic-api listens.')), help=_('The TCP port on which ironic-api listens.')),
cfg.IntOpt('max_limit', cfg.IntOpt('max_limit',
default=1000, default=1000,
mutable=True,
help=_('The maximum number of items returned in a single ' help=_('The maximum number of items returned in a single '
'response from a collection resource.')), 'response from a collection resource.')),
cfg.StrOpt('public_endpoint', cfg.StrOpt('public_endpoint',
mutable=True,
help=_("Public URL to use when building the links to the API " help=_("Public URL to use when building the links to the API "
"resources (for example, \"https://ironic.rocks:6384\")." "resources (for example, \"https://ironic.rocks:6384\")."
" If None the links will be built using the request's " " If None the links will be built using the request's "
@ -57,10 +59,12 @@ opts = [
"to set URLs in responses to the SSL terminated one.")), "to set URLs in responses to the SSL terminated one.")),
cfg.BoolOpt('restrict_lookup', cfg.BoolOpt('restrict_lookup',
default=True, default=True,
mutable=True,
help=_('Whether to restrict the lookup API to only nodes ' help=_('Whether to restrict the lookup API to only nodes '
'in certain states.')), 'in certain states.')),
cfg.IntOpt('ramdisk_heartbeat_timeout', cfg.IntOpt('ramdisk_heartbeat_timeout',
default=300, default=300,
mutable=True,
help=_('Maximum interval (in seconds) for agent heartbeats.')), help=_('Maximum interval (in seconds) for agent heartbeats.')),
] ]

View File

@ -46,6 +46,7 @@ opts = [
# We're using timedelta which can overflow if somebody sets this # We're using timedelta which can overflow if somebody sets this
# too high, so limit to a sane value of 10 years. # too high, so limit to a sane value of 10 years.
max=315576000, max=315576000,
mutable=True,
help=_('Maximum time (in seconds) since the last check-in ' help=_('Maximum time (in seconds) since the last check-in '
'of a conductor. A conductor is considered inactive ' 'of a conductor. A conductor is considered inactive '
'when this time has been exceeded.')), 'when this time has been exceeded.')),
@ -74,6 +75,7 @@ opts = [
'a deploy ramdisk. Set to 0 to disable timeout.')), 'a deploy ramdisk. Set to 0 to disable timeout.')),
cfg.BoolOpt('force_power_state_during_sync', cfg.BoolOpt('force_power_state_during_sync',
default=True, default=True,
mutable=True,
help=_('During sync_power_state, should the hardware power ' help=_('During sync_power_state, should the hardware power '
'state be set to the state recorded in the database ' 'state be set to the state recorded in the database '
'(True) or should the database be updated based on ' '(True) or should the database be updated based on '
@ -162,6 +164,7 @@ opts = [
'0 - unlimited.')), '0 - unlimited.')),
cfg.BoolOpt('automated_clean', cfg.BoolOpt('automated_clean',
default=True, default=True,
mutable=True,
help=_('Enables or disables automated cleaning. Automated ' help=_('Enables or disables automated cleaning. Automated '
'cleaning is a configurable set of steps, ' 'cleaning is a configurable set of steps, '
'such as erasing disk drives, that are performed on ' 'such as erasing disk drives, that are performed on '
@ -206,10 +209,12 @@ opts = [
cfg.IntOpt('soft_power_off_timeout', cfg.IntOpt('soft_power_off_timeout',
default=600, default=600,
min=1, min=1,
mutable=True,
help=_('Timeout (in seconds) of soft reboot and soft power ' help=_('Timeout (in seconds) of soft reboot and soft power '
'off operation. This value always has to be positive.')), 'off operation. This value always has to be positive.')),
cfg.IntOpt('power_state_change_timeout', cfg.IntOpt('power_state_change_timeout',
min=2, default=60, min=2, default=60,
mutable=True,
help=_('Number of seconds to wait for power operations to ' help=_('Number of seconds to wait for power operations to '
'complete, i.e., so that a baremetal node is in the ' 'complete, i.e., so that a baremetal node is in the '
'desired power state. If timed out, the power operation ' 'desired power state. If timed out, the power operation '
@ -255,11 +260,13 @@ opts = [
cfg.StrOpt('rescue_password_hash_algorithm', cfg.StrOpt('rescue_password_hash_algorithm',
default='sha256', default='sha256',
choices=['sha256', 'sha512'], choices=['sha256', 'sha512'],
mutable=True,
help=_('Password hash algorithm to be used for the rescue ' help=_('Password hash algorithm to be used for the rescue '
'password.')), 'password.')),
cfg.BoolOpt('require_rescue_password_hashed', cfg.BoolOpt('require_rescue_password_hashed',
# TODO(TheJulia): Change this to True in Victoria. # TODO(TheJulia): Change this to True in Victoria.
default=False, default=False,
mutable=True,
help=_('Option to cause the conductor to not fallback to ' help=_('Option to cause the conductor to not fallback to '
'an un-hashed version of the rescue password, ' 'an un-hashed version of the rescue password, '
'permitting rescue with older ironic-python-agent ' 'permitting rescue with older ironic-python-agent '

View File

@ -72,6 +72,7 @@ api_opts = [
help=_('Enable pecan debug mode. WARNING: this is insecure ' help=_('Enable pecan debug mode. WARNING: this is insecure '
'and should not be used in a production environment.')), 'and should not be used in a production environment.')),
cfg.StrOpt('default_resource_class', cfg.StrOpt('default_resource_class',
mutable=True,
help=_('Resource class to use for new nodes when no resource ' help=_('Resource class to use for new nodes when no resource '
'class is provided in the creation request.')), 'class is provided in the creation request.')),
] ]
@ -191,6 +192,7 @@ hash_opts = [
image_opts = [ image_opts = [
cfg.BoolOpt('force_raw_images', cfg.BoolOpt('force_raw_images',
default=True, default=True,
mutable=True,
help=_('If True, convert backing images to "raw" disk image ' help=_('If True, convert backing images to "raw" disk image '
'format.')), 'format.')),
cfg.StrOpt('isolinux_bin', cfg.StrOpt('isolinux_bin',
@ -231,6 +233,7 @@ image_opts = [
img_cache_opts = [ img_cache_opts = [
cfg.BoolOpt('parallel_image_downloads', cfg.BoolOpt('parallel_image_downloads',
default=False, default=False,
mutable=True,
help=_('Run image downloads and raw format conversions in ' help=_('Run image downloads and raw format conversions in '
'parallel.')), 'parallel.')),
] ]
@ -304,6 +307,7 @@ path_opts = [
portgroup_opts = [ portgroup_opts = [
cfg.StrOpt( cfg.StrOpt(
'default_portgroup_mode', default='active-backup', 'default_portgroup_mode', default='active-backup',
mutable=True,
help=_( help=_(
'Default mode for portgroups. Allowed values can be found in the ' 'Default mode for portgroups. Allowed values can be found in the '
'linux kernel documentation on bonding: ' 'linux kernel documentation on bonding: '
@ -340,6 +344,7 @@ service_opts = [
'conductor and API services')), 'conductor and API services')),
cfg.BoolOpt('require_agent_token', cfg.BoolOpt('require_agent_token',
default=False, default=False,
mutable=True,
help=_('Used to require the use of agent tokens. These ' help=_('Used to require the use of agent tokens. These '
'tokens are used to guard the api lookup endpoint and ' 'tokens are used to guard the api lookup endpoint and '
'conductor heartbeat processing logic to authenticate ' 'conductor heartbeat processing logic to authenticate '

View File

@ -29,15 +29,18 @@ opts = [
help=_("ironic-conductor node's HTTP root path.")), help=_("ironic-conductor node's HTTP root path.")),
cfg.BoolOpt('enable_ata_secure_erase', cfg.BoolOpt('enable_ata_secure_erase',
default=True, default=True,
mutable=True,
help=_('Whether to support the use of ATA Secure Erase ' help=_('Whether to support the use of ATA Secure Erase '
'during the cleaning process. Defaults to True.')), 'during the cleaning process. Defaults to True.')),
cfg.IntOpt('erase_devices_priority', cfg.IntOpt('erase_devices_priority',
mutable=True,
help=_('Priority to run in-band erase devices via the Ironic ' help=_('Priority to run in-band erase devices via the Ironic '
'Python Agent ramdisk. If unset, will use the priority ' 'Python Agent ramdisk. If unset, will use the priority '
'set in the ramdisk (defaults to 10 for the ' 'set in the ramdisk (defaults to 10 for the '
'GenericHardwareManager). If set to 0, will not run ' 'GenericHardwareManager). If set to 0, will not run '
'during cleaning.')), 'during cleaning.')),
cfg.IntOpt('erase_devices_metadata_priority', cfg.IntOpt('erase_devices_metadata_priority',
mutable=True,
help=_('Priority to run in-band clean step that erases ' help=_('Priority to run in-band clean step that erases '
'metadata from devices, via the Ironic Python Agent ' 'metadata from devices, via the Ironic Python Agent '
'ramdisk. If unset, will use the priority set in the ' 'ramdisk. If unset, will use the priority set in the '
@ -47,11 +50,13 @@ opts = [
cfg.IntOpt('shred_random_overwrite_iterations', cfg.IntOpt('shred_random_overwrite_iterations',
default=1, default=1,
min=0, min=0,
mutable=True,
help=_('During shred, overwrite all block devices N times with ' help=_('During shred, overwrite all block devices N times with '
'random data. This is only used if a device could not ' 'random data. This is only used if a device could not '
'be ATA Secure Erased. Defaults to 1.')), 'be ATA Secure Erased. Defaults to 1.')),
cfg.BoolOpt('shred_final_overwrite_with_zeros', cfg.BoolOpt('shred_final_overwrite_with_zeros',
default=True, default=True,
mutable=True,
help=_("Whether to write zeros to a node's block devices " help=_("Whether to write zeros to a node's block devices "
"after writing random data. This will write zeros to " "after writing random data. This will write zeros to "
"the device even when " "the device even when "
@ -60,6 +65,7 @@ opts = [
"Secure Erased. Defaults to True.")), "Secure Erased. Defaults to True.")),
cfg.BoolOpt('continue_if_disk_secure_erase_fails', cfg.BoolOpt('continue_if_disk_secure_erase_fails',
default=False, default=False,
mutable=True,
help=_('Defines what to do if an ATA secure erase operation ' help=_('Defines what to do if an ATA secure erase operation '
'fails during cleaning in the Ironic Python Agent. ' 'fails during cleaning in the Ironic Python Agent. '
'If False, the cleaning operation will fail and the ' 'If False, the cleaning operation will fail and the '
@ -69,18 +75,21 @@ opts = [
cfg.IntOpt('disk_erasure_concurrency', cfg.IntOpt('disk_erasure_concurrency',
default=1, default=1,
min=1, min=1,
mutable=True,
help=_('Defines the target pool size used by Ironic Python ' help=_('Defines the target pool size used by Ironic Python '
'Agent ramdisk to erase disk devices. The number of ' 'Agent ramdisk to erase disk devices. The number of '
'threads created to erase disks will not exceed this ' 'threads created to erase disks will not exceed this '
'value or the number of disks to be erased.')), 'value or the number of disks to be erased.')),
cfg.BoolOpt('power_off_after_deploy_failure', cfg.BoolOpt('power_off_after_deploy_failure',
default=True, default=True,
mutable=True,
help=_('Whether to power off a node after deploy failure. ' help=_('Whether to power off a node after deploy failure. '
'Defaults to True.')), 'Defaults to True.')),
cfg.StrOpt('default_boot_option', cfg.StrOpt('default_boot_option',
choices=[('netboot', _('boot from a network')), choices=[('netboot', _('boot from a network')),
('local', _('local boot'))], ('local', _('local boot'))],
default='local', default='local',
mutable=True,
help=_('Default boot option to use when no boot option is ' help=_('Default boot option to use when no boot option is '
'requested in node\'s driver_info. Defaults to ' 'requested in node\'s driver_info. Defaults to '
'"local". Prior to the Ussuri release, the default ' '"local". Prior to the Ussuri release, the default '
@ -89,6 +98,7 @@ opts = [
choices=[(boot_modes.UEFI, _('UEFI boot mode')), choices=[(boot_modes.UEFI, _('UEFI boot mode')),
(boot_modes.LEGACY_BIOS, _('Legacy BIOS boot mode'))], (boot_modes.LEGACY_BIOS, _('Legacy BIOS boot mode'))],
default=boot_modes.LEGACY_BIOS, default=boot_modes.LEGACY_BIOS,
mutable=True,
help=_('Default boot mode to use when no boot mode is ' help=_('Default boot mode to use when no boot mode is '
'requested in node\'s driver_info, capabilities or ' 'requested in node\'s driver_info, capabilities or '
'in the `instance_info` configuration. Currently the ' 'in the `instance_info` configuration. Currently the '
@ -103,6 +113,7 @@ opts = [
default=False, default=False,
deprecated_group='conductor', deprecated_group='conductor',
deprecated_name='configdrive_use_swift', deprecated_name='configdrive_use_swift',
mutable=True,
help=_('Whether to upload the config drive to object store. ' help=_('Whether to upload the config drive to object store. '
'Set this option to True to store config drive ' 'Set this option to True to store config drive '
'in a swift endpoint.')), 'in a swift endpoint.')),
@ -115,6 +126,7 @@ opts = [
'instead of swift tempurls.')), 'instead of swift tempurls.')),
cfg.BoolOpt('fast_track', cfg.BoolOpt('fast_track',
default=False, default=False,
mutable=True,
help=_('Whether to allow deployment agents to perform lookup, ' help=_('Whether to allow deployment agents to perform lookup, '
'heartbeat operations during initial states of a ' 'heartbeat operations during initial states of a '
'machine lifecycle and by-pass the normal setup ' 'machine lifecycle and by-pass the normal setup '
@ -127,6 +139,7 @@ opts = [
default=300, default=300,
min=0, min=0,
max=300, max=300,
mutable=True,
help=_('Seconds for which the last heartbeat event is to be ' help=_('Seconds for which the last heartbeat event is to be '
'considered valid for the purpose of a fast ' 'considered valid for the purpose of a fast '
'track sequence. This setting should generally be ' 'track sequence. This setting should generally be '

View File

@ -22,6 +22,7 @@ from ironic.common.i18n import _
opts = [ opts = [
cfg.IntOpt('command_retry_timeout', cfg.IntOpt('command_retry_timeout',
default=60, default=60,
mutable=True,
help=_('Maximum time in seconds to retry retryable IPMI ' help=_('Maximum time in seconds to retry retryable IPMI '
'operations. (An operation is retryable, for ' 'operations. (An operation is retryable, for '
'example, if the requested operation fails ' 'example, if the requested operation fails '
@ -31,18 +32,21 @@ opts = [
'unresponsive BMCs.')), 'unresponsive BMCs.')),
cfg.IntOpt('min_command_interval', cfg.IntOpt('min_command_interval',
default=5, default=5,
mutable=True,
help=_('Minimum time, in seconds, between IPMI operations ' help=_('Minimum time, in seconds, between IPMI operations '
'sent to a server. There is a risk with some hardware ' 'sent to a server. There is a risk with some hardware '
'that setting this too low may cause the BMC to crash. ' 'that setting this too low may cause the BMC to crash. '
'Recommended setting is 5 seconds.')), 'Recommended setting is 5 seconds.')),
cfg.BoolOpt('kill_on_timeout', cfg.BoolOpt('kill_on_timeout',
default=True, default=True,
mutable=True,
help=_('Kill `ipmitool` process invoked by ironic to read ' help=_('Kill `ipmitool` process invoked by ironic to read '
'node power state if `ipmitool` process does not exit ' 'node power state if `ipmitool` process does not exit '
'after `command_retry_timeout` timeout expires. ' 'after `command_retry_timeout` timeout expires. '
'Recommended setting is True')), 'Recommended setting is True')),
cfg.BoolOpt('disable_boot_timeout', cfg.BoolOpt('disable_boot_timeout',
default=True, default=True,
mutable=True,
help=_('Default timeout behavior whether ironic sends a raw ' help=_('Default timeout behavior whether ironic sends a raw '
'IPMI command to disable the 60 second timeout for ' 'IPMI command to disable the 60 second timeout for '
'booting. Setting this option to False will NOT send ' 'booting. Setting this option to False will NOT send '
@ -51,10 +55,12 @@ opts = [
'option in node\'s \'driver_info\' field.')), 'option in node\'s \'driver_info\' field.')),
cfg.MultiStrOpt('additional_retryable_ipmi_errors', cfg.MultiStrOpt('additional_retryable_ipmi_errors',
default=[], default=[],
mutable=True,
help=_('Additional errors ipmitool may encounter, ' help=_('Additional errors ipmitool may encounter, '
'specific to the environment it is run in.')), 'specific to the environment it is run in.')),
cfg.BoolOpt('debug', cfg.BoolOpt('debug',
default=False, default=False,
mutable=True,
help=_('Enables all ipmi commands to be executed with an ' help=_('Enables all ipmi commands to be executed with an '
'additional debugging output. This is a separate ' 'additional debugging output. This is a separate '
'option as ipmitool can log a substantial amount ' 'option as ipmitool can log a substantial amount '

View File

@ -21,9 +21,11 @@ from ironic.common.i18n import _
opts = [ opts = [
cfg.PortOpt('portal_port', cfg.PortOpt('portal_port',
default=3260, default=3260,
mutable=True,
help=_('The port number on which the iSCSI portal listens ' help=_('The port number on which the iSCSI portal listens '
'for incoming connections.')), 'for incoming connections.')),
cfg.StrOpt('conv_flags', cfg.StrOpt('conv_flags',
mutable=True,
help=_('Flags that need to be sent to the dd command, ' help=_('Flags that need to be sent to the dd command, '
'to control the conversion of the original file ' 'to control the conversion of the original file '
'when copying to the host. It can contain several ' 'when copying to the host. It can contain several '
@ -31,6 +33,7 @@ opts = [
cfg.IntOpt('verify_attempts', cfg.IntOpt('verify_attempts',
default=3, default=3,
min=1, min=1,
mutable=True,
help=_('Maximum attempts to verify an iSCSI connection is ' help=_('Maximum attempts to verify an iSCSI connection is '
'active, sleeping 1 second between attempts. Defaults ' 'active, sleeping 1 second between attempts. Defaults '
'to 3.')), 'to 3.')),

View File

@ -23,12 +23,15 @@ opts = [
cfg.IntOpt('port_setup_delay', cfg.IntOpt('port_setup_delay',
default=0, default=0,
min=0, min=0,
mutable=True,
help=_('Delay value to wait for Neutron agents to setup ' help=_('Delay value to wait for Neutron agents to setup '
'sufficient DHCP configuration for port.')), 'sufficient DHCP configuration for port.')),
cfg.IntOpt('retries', cfg.IntOpt('retries',
default=3, default=3,
mutable=True,
help=_('Client retries in the case of a failed request.')), help=_('Client retries in the case of a failed request.')),
cfg.StrOpt('cleaning_network', cfg.StrOpt('cleaning_network',
mutable=True,
help=_('Neutron network UUID or name for the ramdisk to be ' help=_('Neutron network UUID or name for the ramdisk to be '
'booted into for cleaning nodes. Required for "neutron" ' 'booted into for cleaning nodes. Required for "neutron" '
'network interface. It is also required if cleaning ' 'network interface. It is also required if cleaning '
@ -37,6 +40,7 @@ opts = [
'unique among all networks or cleaning will fail.'), 'unique among all networks or cleaning will fail.'),
deprecated_name='cleaning_network_uuid'), deprecated_name='cleaning_network_uuid'),
cfg.StrOpt('provisioning_network', cfg.StrOpt('provisioning_network',
mutable=True,
help=_('Neutron network UUID or name for the ramdisk to be ' help=_('Neutron network UUID or name for the ramdisk to be '
'booted into for provisioning nodes. Required for ' 'booted into for provisioning nodes. Required for '
'"neutron" network interface. If a name is provided, ' '"neutron" network interface. If a name is provided, '
@ -45,6 +49,7 @@ opts = [
deprecated_name='provisioning_network_uuid'), deprecated_name='provisioning_network_uuid'),
cfg.ListOpt('provisioning_network_security_groups', cfg.ListOpt('provisioning_network_security_groups',
default=[], default=[],
mutable=True,
help=_('List of Neutron Security Group UUIDs to be ' help=_('List of Neutron Security Group UUIDs to be '
'applied during provisioning of the nodes. ' 'applied during provisioning of the nodes. '
'Optional for the "neutron" network interface and not ' 'Optional for the "neutron" network interface and not '
@ -53,6 +58,7 @@ opts = [
'is used.')), 'is used.')),
cfg.ListOpt('cleaning_network_security_groups', cfg.ListOpt('cleaning_network_security_groups',
default=[], default=[],
mutable=True,
help=_('List of Neutron Security Group UUIDs to be ' help=_('List of Neutron Security Group UUIDs to be '
'applied during cleaning of the nodes. ' 'applied during cleaning of the nodes. '
'Optional for the "neutron" network interface and not ' 'Optional for the "neutron" network interface and not '
@ -60,6 +66,7 @@ opts = [
'If not specified, default security group ' 'If not specified, default security group '
'is used.')), 'is used.')),
cfg.StrOpt('rescuing_network', cfg.StrOpt('rescuing_network',
mutable=True,
help=_('Neutron network UUID or name for booting the ramdisk ' help=_('Neutron network UUID or name for booting the ramdisk '
'for rescue mode. This is not the network that the ' 'for rescue mode. This is not the network that the '
'rescue ramdisk will use post-boot -- the tenant ' 'rescue ramdisk will use post-boot -- the tenant '
@ -70,6 +77,7 @@ opts = [
'among all networks or rescue will fail.')), 'among all networks or rescue will fail.')),
cfg.ListOpt('rescuing_network_security_groups', cfg.ListOpt('rescuing_network_security_groups',
default=[], default=[],
mutable=True,
help=_('List of Neutron Security Group UUIDs to be applied ' help=_('List of Neutron Security Group UUIDs to be applied '
'during the node rescue process. Optional for the ' 'during the node rescue process. Optional for the '
'"neutron" network interface and not used for the ' '"neutron" network interface and not used for the '
@ -77,6 +85,7 @@ opts = [
'specified, the default security group is used.')), 'specified, the default security group is used.')),
cfg.IntOpt('request_timeout', cfg.IntOpt('request_timeout',
default=45, default=45,
mutable=True,
help=_('Timeout for request processing when interacting ' help=_('Timeout for request processing when interacting '
'with Neutron. This value should be increased if ' 'with Neutron. This value should be increased if '
'neutron port action timeouts are observed as neutron ' 'neutron port action timeouts are observed as neutron '
@ -85,18 +94,21 @@ opts = [
'client/server interactions.')), 'client/server interactions.')),
cfg.BoolOpt('add_all_ports', cfg.BoolOpt('add_all_ports',
default=False, default=False,
mutable=True,
help=_('Option to enable transmission of all ports ' help=_('Option to enable transmission of all ports '
'to neutron when creating ports for provisioning, ' 'to neutron when creating ports for provisioning, '
'cleaning, or rescue. This is done without IP ' 'cleaning, or rescue. This is done without IP '
'addresses assigned to the port, and may be useful ' 'addresses assigned to the port, and may be useful '
'in some bonded network configurations.')), 'in some bonded network configurations.')),
cfg.StrOpt('inspection_network', cfg.StrOpt('inspection_network',
mutable=True,
help=_('Neutron network UUID or name for the ramdisk to be ' help=_('Neutron network UUID or name for the ramdisk to be '
'booted into for in-band inspection of nodes. ' 'booted into for in-band inspection of nodes. '
'If a name is provided, it must be unique among all ' 'If a name is provided, it must be unique among all '
'networks or inspection will fail.')), 'networks or inspection will fail.')),
cfg.ListOpt('inspection_network_security_groups', cfg.ListOpt('inspection_network_security_groups',
default=[], default=[],
mutable=True,
help=_('List of Neutron Security Group UUIDs to be applied ' help=_('List of Neutron Security Group UUIDs to be applied '
'during the node inspection process. Optional for the ' 'during the node inspection process. Optional for the '
'"neutron" network interface and not used for the ' '"neutron" network interface and not used for the '
@ -104,6 +116,7 @@ opts = [
'specified, the default security group is used.')), 'specified, the default security group is used.')),
cfg.IntOpt('dhcpv6_stateful_address_count', cfg.IntOpt('dhcpv6_stateful_address_count',
default=4, default=4,
mutable=True,
help=_('Number of IPv6 addresses to allocate for ports created ' help=_('Number of IPv6 addresses to allocate for ports created '
'for provisioning, cleaning, rescue or inspection on ' 'for provisioning, cleaning, rescue or inspection on '
'DHCPv6-stateful networks. Different stages of the ' 'DHCPv6-stateful networks. Different stages of the '

View File

@ -18,6 +18,7 @@ from ironic.conf import auth
opts = [ opts = [
cfg.BoolOpt('send_power_notifications', cfg.BoolOpt('send_power_notifications',
default=True, default=True,
mutable=True,
help=_('When set to True, it will enable the support ' help=_('When set to True, it will enable the support '
'for power state change callbacks to nova. This ' 'for power state change callbacks to nova. This '
'option should be set to False in deployments ' 'option should be set to False in deployments '

View File

@ -23,9 +23,11 @@ from ironic.common.i18n import _
opts = [ opts = [
cfg.StrOpt('pxe_append_params', cfg.StrOpt('pxe_append_params',
default='nofb nomodeset vga=normal', default='nofb nomodeset vga=normal',
mutable=True,
help=_('Additional append parameters for baremetal PXE boot.')), help=_('Additional append parameters for baremetal PXE boot.')),
cfg.StrOpt('default_ephemeral_format', cfg.StrOpt('default_ephemeral_format',
default='ext4', default='ext4',
mutable=True,
help=_('Default file system format for ephemeral partition, ' help=_('Default file system format for ephemeral partition, '
'if one is created.')), 'if one is created.')),
cfg.StrOpt('images_path', cfg.StrOpt('images_path',
@ -50,16 +52,19 @@ opts = [
cfg.StrOpt('pxe_config_template', cfg.StrOpt('pxe_config_template',
default=os.path.join( default=os.path.join(
'$pybasedir', 'drivers/modules/pxe_config.template'), '$pybasedir', 'drivers/modules/pxe_config.template'),
mutable=True,
help=_('On ironic-conductor node, template file for PXE ' help=_('On ironic-conductor node, template file for PXE '
'configuration.')), 'configuration.')),
cfg.StrOpt('uefi_pxe_config_template', cfg.StrOpt('uefi_pxe_config_template',
default=os.path.join( default=os.path.join(
'$pybasedir', '$pybasedir',
'drivers/modules/pxe_grub_config.template'), 'drivers/modules/pxe_grub_config.template'),
mutable=True,
help=_('On ironic-conductor node, template file for PXE ' help=_('On ironic-conductor node, template file for PXE '
'configuration for UEFI boot loader.')), 'configuration for UEFI boot loader.')),
cfg.DictOpt('pxe_config_template_by_arch', cfg.DictOpt('pxe_config_template_by_arch',
default={}, default={},
mutable=True,
help=_('On ironic-conductor node, template file for PXE ' help=_('On ironic-conductor node, template file for PXE '
'configuration per node architecture. ' 'configuration per node architecture. '
'For example: ' 'For example: '
@ -129,10 +134,12 @@ opts = [
default='4', default='4',
choices=[('4', _('IPv4')), choices=[('4', _('IPv4')),
('6', _('IPv6'))], ('6', _('IPv6'))],
mutable=True,
help=_('The IP version that will be used for PXE booting. ' help=_('The IP version that will be used for PXE booting. '
'Defaults to 4. EXPERIMENTAL')), 'Defaults to 4. EXPERIMENTAL')),
cfg.BoolOpt('ipxe_use_swift', cfg.BoolOpt('ipxe_use_swift',
default=False, default=False,
mutable=True,
help=_("Download deploy and rescue images directly from swift " help=_("Download deploy and rescue images directly from swift "
"using temporary URLs. " "using temporary URLs. "
"If set to false (default), images are downloaded " "If set to false (default), images are downloaded "

View File

@ -46,6 +46,7 @@ opts = [
help=_('Redfish HTTP client authentication method.')), help=_('Redfish HTTP client authentication method.')),
cfg.BoolOpt('use_swift', cfg.BoolOpt('use_swift',
default=True, default=True,
mutable=True,
help=_('Upload generated ISO images for virtual media boot to ' help=_('Upload generated ISO images for virtual media boot to '
'Swift, then pass temporary URL to BMC for booting the ' 'Swift, then pass temporary URL to BMC for booting the '
'node. If set to false, images are placed on the ' 'node. If set to false, images are placed on the '
@ -53,15 +54,18 @@ opts = [
'local HTTP server.')), 'local HTTP server.')),
cfg.StrOpt('swift_container', cfg.StrOpt('swift_container',
default='ironic_redfish_container', default='ironic_redfish_container',
mutable=True,
help=_('The Swift container to store Redfish driver data. ' help=_('The Swift container to store Redfish driver data. '
'Applies only when `use_swift` is enabled.')), 'Applies only when `use_swift` is enabled.')),
cfg.IntOpt('swift_object_expiry_timeout', cfg.IntOpt('swift_object_expiry_timeout',
default=900, default=900,
mutable=True,
help=_('Amount of time in seconds for Swift objects to ' help=_('Amount of time in seconds for Swift objects to '
'auto-expire. Applies only when `use_swift` is ' 'auto-expire. Applies only when `use_swift` is '
'enabled.')), 'enabled.')),
cfg.StrOpt('kernel_append_params', cfg.StrOpt('kernel_append_params',
default='nofb nomodeset vga=normal', default='nofb nomodeset vga=normal',
mutable=True,
help=_('Additional kernel parameters to pass down to the ' help=_('Additional kernel parameters to pass down to the '
'instance kernel. These parameters can be consumed by ' 'instance kernel. These parameters can be consumed by '
'the kernel or by the applications by reading ' 'the kernel or by the applications by reading '

View File

@ -838,7 +838,7 @@ class InstanceImageCache(image_cache.ImageCache):
@METRICS.timer('cache_instance_image') @METRICS.timer('cache_instance_image')
def cache_instance_image(ctx, node, force_raw=CONF.force_raw_images): def cache_instance_image(ctx, node, force_raw=None):
"""Fetch the instance's image from Glance """Fetch the instance's image from Glance
This method pulls the AMI and writes them to the appropriate place This method pulls the AMI and writes them to the appropriate place
@ -850,6 +850,10 @@ def cache_instance_image(ctx, node, force_raw=CONF.force_raw_images):
:returns: a tuple containing the uuid of the image and the path in :returns: a tuple containing the uuid of the image and the path in
the filesystem where image is cached. the filesystem where image is cached.
""" """
# NOTE(dtantsur): applying the default here to make the option mutable
if force_raw is None:
force_raw = CONF.force_raw_images
i_info = parse_instance_info(node) i_info = parse_instance_info(node)
fileutils.ensure_tree(_get_image_dir_path(node.uuid)) fileutils.ensure_tree(_get_image_dir_path(node.uuid))
image_path = _get_image_file_path(node.uuid) image_path = _get_image_file_path(node.uuid)

View File

@ -283,6 +283,8 @@ def deploy_partition_image(
NOTE: If key exists but value is None, it means partition doesn't NOTE: If key exists but value is None, it means partition doesn't
exist. exist.
""" """
# NOTE(dtantsur): CONF.default_boot_option is mutable, don't use it in
# the function signature!
boot_option = boot_option or deploy_utils.get_default_boot_option() boot_option = boot_option or deploy_utils.get_default_boot_option()
image_mb = disk_utils.get_image_mb(image_path) image_mb = disk_utils.get_image_mb(image_path)
if image_mb > root_mb: if image_mb > root_mb:

View File

@ -0,0 +1,48 @@
---
other:
- |
The following configuration options can now be reloaded without restarting
ironic:
From ``[agent]``: ``memory_consumed_by_agent``, ``stream_raw_images``,
``deploy_logs_*``, ``image_download_source``, ``command_timeout``
and ``neutron_agent_poll_interval``.
From ``[api]``: ``max_limit``, ``public_endpoint``
and ``ramdisk_heartbeat_timeout``.
From ``[conductor]``: ``heartbeat_timeout``,
``force_power_state_during_sync``, ``automated_clean``,
``soft_power_off_timeout``, ``power_state_change_timeout``,
``rescue_password_hash_algorithm`` and ``require_rescue_password_hashed``.
From ``[DEFAULT]``: ``default_resource_class``, ``force_raw_images``,
``parallel_image_downloads``, ``default_portgroup_mode``
and ``require_agent_token``.
From ``[deploy]``: ``enable_ata_secure_erase``, ``erase_devices_priority``,
``erase_devices_metadata_priority``, ``shred_random_overwrite_iterations``,
``shred_final_overwrite_with_zeros``,
``continue_if_disk_secure_erase_fails``, ``disk_erasure_concurrency``,
``power_off_after_deploy_failure``, ``default_boot_option``,
``default_boot_mode``, ``configdrive_use_object_store``, ``fast_track``,
and ``fast_track_timeout``.
From ``[ipmi]``: ``kill_on_timeout``, ``disable_boot_timeout``,
``command_retry_interval``, ``min_command_interval``, ``debug``
and ``additional_retryable_ipmi_errors``.
From ``[iscsi]``: ``portal_port``, ``conv_flags`` and ``verify_attempts``.
From ``[neutron]``: ``port_setup_delay``, ``*_network``,
``*_network_security_groups``, ``request_timeout``, ``add_all_ports``
and ``dhcpv6_stateful_address_count``.
From ``[nova]``: ``send_power_notifications``.
From ``[pxe]``: ``pxe_append_params``, ``default_ephemeral_format``,
``pxe_config_template``, ``uefi_pxe_config_template``,
``pxe_config_template_by_arch``, ``ip_version`` and ``ipxe_use_swift``.
From ``[redfish]``: ``use_swift``, ``swift_container``,
``swift_object_expiry_timeout`` and ``kernel_append_params``.