from cinder.openstack.common import processutils as putils
LOG = logging.getLogger(__name__)
+
+connector_opts = [
+ cfg.IntOpt('num_volume_device_scan_tries',
+ deprecated_name='num_iscsi_scan_tries',
+ default=3,
+ help='The maximum number of times to rescan targets'
+ 'to find volume'),
+]
+
CONF = cfg.CONF
+CONF.register_opts(connector_opts)
+
synchronized = lockutils.synchronized_with_prefix('brick-')
# TODO(justinsb): This retry-with-delay is a pattern, move to utils?
tries = 0
while not os.path.exists(host_device):
- if tries >= CONF.num_iscsi_scan_tries:
+ if tries >= CONF.num_volume_device_scan_tries:
raise exception.VolumeDeviceNotFound(device=host_device)
LOG.warn(_("ISCSI volume not yet found at: %(host_device)s. "
self.device_name = os.path.realpath(device)
raise loopingcall.LoopingCallDone()
- if self.tries >= CONF.num_iscsi_scan_tries:
+ if self.tries >= CONF.num_volume_device_scan_tries:
msg = _("Fibre Channel volume device not found.")
LOG.error(msg)
raise exception.NoFibreChannelVolumeDeviceFound()
cfg.IntOpt('reserved_percentage',
default=0,
help='The percentage of backend capacity is reserved'),
- cfg.IntOpt('num_iscsi_scan_tries',
- default=3,
- help='The maximum number of times to rescan iSCSI target'
- 'to find volume'),
cfg.IntOpt('iscsi_num_targets',
default=100,
help='The maximum number of iscsi target ids per host'),