Skip to content

Commit

Permalink
fix iscsi mapping issue
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychou committed Feb 17, 2017
1 parent 772a246 commit fed7ce1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions infortrend/raidcmd_cli/common_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ def _get_mapping_info_with_mpio(self):

map_lun = self._get_minimum_common_lun_id(map_chl)

if map_lun is None:
if not map_lun:
msg = _('Cannot find a common lun id for mapping.')
LOG.error(msg)
raise exception.VolumeDriverException(message=msg)
Expand All @@ -1089,12 +1089,12 @@ def _get_minimum_common_lun_id(self, channel_dict):
"""Find the minimun common lun id in all channels."""
map_lun = []
for lun_id in range(self.constants['MAX_LUN_MAP_PER_CHL']):
check_map = True
has_mapped = False
for controller in channel_dict.keys():
for channel_id in channel_dict[controller]:
if lun_id not in self.map_dict['slot_a'][channel_id]:
check_map = False
if check_map:
if lun_id not in self.map_dict[controller][channel_id]:
has_mapped = True
if not has_mapped:
map_lun.append(str(lun_id))
break

Expand Down

0 comments on commit fed7ce1

Please sign in to comment.