Remove reference to deprecated [disk_utils]iscsi_verify_attempts

The configuration option [disk_utils]iscsi_verify_attempts was
deprecated in Train and it's been removed from ironic-lib.

Change-Id: Ibe1dc230be037ff3cd4ca72d3900296c423bba06
This commit is contained in:
Riccardo Pittau 2020-01-10 10:01:30 +01:00
parent a37898d704
commit df047e07c8
3 changed files with 10 additions and 15 deletions

View File

@ -28,14 +28,12 @@ opts = [
'to control the conversion of the original file '
'when copying to the host. It can contain several '
'options separated by commas.')),
# TODO(dtantsur): update in Ussuri when the deprecated option is removed
# from ironic-lib.
cfg.IntOpt('verify_attempts',
default=3,
min=1,
help=_('Maximum attempts to verify an iSCSI connection is '
'active, sleeping 1 second between attempts. Defaults '
'to the deprecated [disk_utils]iscsi_verify_attempts '
'option, after its removal will default to 3.')),
'to 3.')),
]

View File

@ -87,15 +87,6 @@ def _get_ironic_session():
return _IRONIC_SESSION
# TODO(dtantsur): just use CONF.iscsi.verify_attempts when
# iscsi_verify_attempts is removed from ironic-lib.
def _iscsi_verify_attempts():
# Be prepared for eventual removal, hardcode the default of 3
return (getattr(CONF.disk_utils, 'iscsi_verify_attempts', 3)
if CONF.iscsi.verify_attempts is None
else CONF.iscsi.verify_attempts)
def _wrap_ipv6(ip):
if netutils.is_valid_ipv6(ip):
return "[%s]" % ip
@ -193,7 +184,7 @@ def check_file_system_for_iscsi_device(portal_address,
check_dir = "/dev/disk/by-path/ip-%s:%s-iscsi-%s-lun-1" % (portal_address,
portal_port,
target_iqn)
total_checks = _iscsi_verify_attempts()
total_checks = CONF.iscsi.verify_attempts
for attempt in range(total_checks):
if os.path.exists(check_dir):
break
@ -217,7 +208,7 @@ def verify_iscsi_connection(target_iqn):
"""Verify iscsi connection."""
LOG.debug("Checking for iSCSI target to become active.")
total_checks = _iscsi_verify_attempts()
total_checks = CONF.iscsi.verify_attempts
for attempt in range(total_checks):
out, _err = utils.execute('iscsiadm',
'-m', 'node',

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The configuration option ``[disk_utils]iscsi_verify_attempts``
was deprecated in Train and it's now removed from ironic-lib.
Please use the ``[iscsi]verify_attempts`` option instead.