From: Yuriy Taraday Date: Fri, 18 Jan 2013 13:44:22 +0000 (+0400) Subject: Add LUN# to provider_location in Nexenta driver. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=00057454f6609871c2cabf874876d26a6d0d0641;p=openstack-build%2Fcinder-build.git Add LUN# to provider_location in Nexenta driver. Fixes bug 1088411. Lets Nexenta driver work with any iscsi_helper. Change-Id: Ib70ed94fa472c7281de077f0f36575216741678f --- diff --git a/cinder/tests/test_nexenta.py b/cinder/tests/test_nexenta.py index 9762f9738..e430809c0 100644 --- a/cinder/tests/test_nexenta.py +++ b/cinder/tests/test_nexenta.py @@ -148,10 +148,10 @@ class TestNexentaDriver(cinder.test.TestCase): self.assertEquals( retval, {'provider_location': - '%s:%s,1 %s%s' % (FLAGS.nexenta_host, - FLAGS.nexenta_iscsi_target_portal_port, - FLAGS.nexenta_target_prefix, - self.TEST_VOLUME_NAME)}) + '%s:%s,1 %s%s 0' % (FLAGS.nexenta_host, + FLAGS.nexenta_iscsi_target_portal_port, + FLAGS.nexenta_target_prefix, + self.TEST_VOLUME_NAME)}) def __get_test(i): def _test_create_export_fail(self): diff --git a/cinder/volume/drivers/nexenta/volume.py b/cinder/volume/drivers/nexenta/volume.py index 0b737e914..a384f3427 100644 --- a/cinder/volume/drivers/nexenta/volume.py +++ b/cinder/volume/drivers/nexenta/volume.py @@ -234,9 +234,9 @@ class NexentaDriver(driver.ISCSIDriver): # pylint: disable=R0921 else: LOG.info(_('Ignored LUN mapping entry addition error "%s"' ' while ensuring export'), exc) - return '%s:%s,1 %s' % (FLAGS.nexenta_host, - FLAGS.nexenta_iscsi_target_portal_port, - target_name) + return '%s:%s,1 %s 0' % (FLAGS.nexenta_host, + FLAGS.nexenta_iscsi_target_portal_port, + target_name) def create_export(self, _ctx, volume): """Create new export for zvol.