Merge "Remove reference to deprecated [disk_utils]iscsi_verify_attempts"
This commit is contained in:
commit
1430a5e497
@ -28,14 +28,12 @@ opts = [
|
|||||||
'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 '
|
||||||
'options separated by commas.')),
|
'options separated by commas.')),
|
||||||
# TODO(dtantsur): update in Ussuri when the deprecated option is removed
|
|
||||||
# from ironic-lib.
|
|
||||||
cfg.IntOpt('verify_attempts',
|
cfg.IntOpt('verify_attempts',
|
||||||
|
default=3,
|
||||||
min=1,
|
min=1,
|
||||||
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 the deprecated [disk_utils]iscsi_verify_attempts '
|
'to 3.')),
|
||||||
'option, after its removal will default to 3.')),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,15 +87,6 @@ def _get_ironic_session():
|
|||||||
return _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):
|
def _wrap_ipv6(ip):
|
||||||
if netutils.is_valid_ipv6(ip):
|
if netutils.is_valid_ipv6(ip):
|
||||||
return "[%s]" % 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,
|
check_dir = "/dev/disk/by-path/ip-%s:%s-iscsi-%s-lun-1" % (portal_address,
|
||||||
portal_port,
|
portal_port,
|
||||||
target_iqn)
|
target_iqn)
|
||||||
total_checks = _iscsi_verify_attempts()
|
total_checks = CONF.iscsi.verify_attempts
|
||||||
for attempt in range(total_checks):
|
for attempt in range(total_checks):
|
||||||
if os.path.exists(check_dir):
|
if os.path.exists(check_dir):
|
||||||
break
|
break
|
||||||
@ -217,7 +208,7 @@ def verify_iscsi_connection(target_iqn):
|
|||||||
"""Verify iscsi connection."""
|
"""Verify iscsi connection."""
|
||||||
LOG.debug("Checking for iSCSI target to become active.")
|
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):
|
for attempt in range(total_checks):
|
||||||
out, _err = utils.execute('iscsiadm',
|
out, _err = utils.execute('iscsiadm',
|
||||||
'-m', 'node',
|
'-m', 'node',
|
||||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user