Remove unused connection properties

Refactor iSCSI connect is was introduced in this patch:
  https://review.openstack.org/#/c/455393/.

The method _connect_vol is used for parallelize logins, we shouldn't
give these arguments('target_portals', 'target_iqns', 'target_luns');
and it will also make a mess in the debug message in _connect_vol.
So, just kick them out.

Change-Id: I76fc7645bfe00c3b1653fce4eace8a6430930ad2
This commit is contained in:
yenai 2018-09-21 14:55:09 +08:00
parent 5742ebe17d
commit e75393140c
1 changed files with 7 additions and 0 deletions

View File

@ -707,6 +707,13 @@ class ISCSIConnector(base.BaseLinuxConnector, base_iscsi.BaseISCSIConnector):
for ip, iqn, lun in ips_iqns_luns:
props = connection_properties.copy()
props.update(target_portal=ip, target_iqn=iqn, target_lun=lun)
# NOTE(yenai): The method _connect_vol is used for parallelize
# logins, we shouldn't give these arguments; and it will make a
# mess in the debug message in _connect_vol. So, kick them out:
for key in ('target_portals', 'target_iqns', 'target_luns'):
props.pop(key, None)
threads.append(executor.Thread(target=self._connect_vol,
args=(retries, props, data)))
for thread in threads: