]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
XtremIO fix remapping bug
authorShay Halsband <shay.halsband@emc.com>
Tue, 1 Sep 2015 05:35:21 +0000 (08:35 +0300)
committerShay Halsband <shay.halsband@emc.com>
Sun, 27 Sep 2015 06:44:35 +0000 (09:44 +0300)
1. formatting error
2. pass initiator group name(at index 1) instead of
   index(at index 2) to create_lun_map

Change-Id: I05b6468261fe352c80f6f8e115b8e69eea551089
Closes-bug: #1499207

cinder/volume/drivers/emc/xtremio.py

index 5c55e437d53ab33acce400aaad5d6a03be737738..21fd2a151702c35c0bf1cf14c67ebaf189f3253b 100644 (file)
@@ -530,7 +530,7 @@ class XtremIOVolumeDriver(san.SanDriver):
             lunmap = self._obj_from_result(res)
             LOG.info(_LI('Created lun-map:\n%s'), lunmap)
         except exception.XtremIOAlreadyMappedError:
-            LOG.info(_LI('Volume already mapped, retrieving %(ig)s, %(vol)d'),
+            LOG.info(_LI('Volume already mapped, retrieving %(ig)s, %(vol)s'),
                      {'ig': ig, 'vol': volume['id']})
             lunmap = self.client.find_lunmap(ig, volume['id'])
         return lunmap
@@ -748,7 +748,7 @@ class XtremIOISCSIDriver(XtremIOVolumeDriver, driver.ISCSIDriver):
             self.client.req('initiators', 'PUT', data, idx=initiator['index'])
 
         # lun mappping
-        lunmap = self.create_lun_map(volume, ig['ig-id'][2])
+        lunmap = self.create_lun_map(volume, ig['ig-id'][1])
 
         properties = self._get_iscsi_properties(lunmap)