Add lun number (0) to model_update in HpSanDriver
The HpSanDriver was not setting the lun number in model_update and as a result default value of 1 was being used. Trouble is the Lun number used by LeftHand is 0, so the connect info would be wrong and fail when trying to attach the volume. Fixes bug #1053717 Change-Id: I2391db062dff35365030e33c3eb0569fdd397949
This commit is contained in:
@@ -175,7 +175,7 @@ class HpSanISCSITestCase(test.TestCase):
|
||||
def test_create_volume(self):
|
||||
volume = {'name': self.volume_name, 'size': 1}
|
||||
model_update = self.driver.create_volume(volume)
|
||||
expected_iqn = "iqn.2003-10.com.lefthandnetworks:group01:25366:fakev"
|
||||
expected_iqn = "iqn.2003-10.com.lefthandnetworks:group01:25366:fakev 0"
|
||||
expected_location = "10.0.1.6:3260,1 %s" % expected_iqn
|
||||
self.assertEqual(model_update['provider_location'], expected_location)
|
||||
|
||||
|
||||
@@ -579,9 +579,12 @@ class HpSanISCSIDriver(SanISCSIDriver):
|
||||
iscsi_portal = cluster_vip + ":3260," + cluster_interface
|
||||
|
||||
model_update = {}
|
||||
model_update['provider_location'] = ("%s %s" %
|
||||
|
||||
# NOTE(jdg): LH volumes always at lun 0 ?
|
||||
model_update['provider_location'] = ("%s %s %s" %
|
||||
(iscsi_portal,
|
||||
iscsi_iqn))
|
||||
iscsi_iqn,
|
||||
0))
|
||||
|
||||
return model_update
|
||||
|
||||
|
||||
Reference in New Issue
Block a user