]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix ISER scan retry option
authorEric Harney <eharney@redhat.com>
Tue, 27 May 2014 14:11:53 +0000 (10:11 -0400)
committerEric Harney <eharney@redhat.com>
Tue, 27 May 2014 16:24:42 +0000 (12:24 -0400)
The 'num_iscsi_scan_tries' option was renamed to
'num_volume_device_scan_tries'.

Remove it from the test where the deprecated name is
referenced since it is not used there anyway.

Fix the ISER driver to set the new config field rather than the
old one.  Presumably this made the num_iser_scan_tries option
not work since only the new field is passed to the brick
connector.

Closes-Bug: #1323741

Change-Id: I13ac4cce10894b541054fbda719bbc5fd555e3c1

cinder/tests/test_volume.py
cinder/volume/driver.py

index a0016af73ecc9f61a9301c2f1825664822ad869a..34fd467186cfb5360e5be26168e74e7957015bc6 100644 (file)
@@ -3046,7 +3046,6 @@ class ISCSITestCase(DriverTestCase):
     def setUp(self):
         super(ISCSITestCase, self).setUp()
         self.configuration = mox.MockObject(conf.Configuration)
-        self.configuration.num_iscsi_scan_tries = 3
         self.configuration.iscsi_num_targets = 100
         self.configuration.iscsi_target_prefix = 'iqn.2010-10.org.openstack:'
         self.configuration.iscsi_ip_address = '0.0.0.0'
index 56c92ba914e3735af7669f2a164e04acade69fdf..0852e29ca91c9241cc1951cc3eab4618b4981907 100644 (file)
@@ -939,7 +939,7 @@ class ISERDriver(ISCSIDriver):
     def __init__(self, *args, **kwargs):
         super(ISERDriver, self).__init__(*args, **kwargs)
         # for backward compatibility
-        self.configuration.num_iscsi_scan_tries = \
+        self.configuration.num_volume_device_scan_tries = \
             self.configuration.num_iser_scan_tries
         self.configuration.iscsi_num_targets = \
             self.configuration.iser_num_targets