]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove lio_initiator_iqns
authorEric Harney <eharney@redhat.com>
Thu, 9 Oct 2014 20:26:18 +0000 (16:26 -0400)
committerEric Harney <eharney@redhat.com>
Wed, 3 Dec 2014 21:32:09 +0000 (16:32 -0500)
This is a holdover from the initial LIO implementation
which did not manage ACLs sufficiently.  This is
unneeded now and handled by:
67dd248 LIO iSCSI initiator ACL auto-config

DocImpact: remove lio_initiator_iqns cfg opt

Closes-Bug: #1390383

Change-Id: I3b7fe4765c1c568a6a7713f86cadece52b130911

cinder/brick/iscsi/iscsi.py
cinder/tests/conf_fixture.py
cinder/volume/driver.py
cinder/volume/targets/lio.py
etc/cinder/cinder.conf.sample

index a106b8f834043c4c7c0acaf3e2305d66a306bb49..1ccdf47117b2988a38727d49ab16dbef4ceb2edd 100644 (file)
@@ -508,13 +508,12 @@ class FakeIscsiHelper(object):
 
 class LioAdm(TargetAdmin):
     """iSCSI target administration for LIO using python-rtslib."""
-    def __init__(self, root_helper, lio_initiator_iqns='',
+    def __init__(self, root_helper,
                  iscsi_target_prefix='iqn.2010-10.org.openstack:',
                  execute=putils.execute):
         super(LioAdm, self).__init__('cinder-rtstool', root_helper, execute)
 
         self.iscsi_target_prefix = iscsi_target_prefix
-        self.lio_initiator_iqns = lio_initiator_iqns
         self._verify_rtstool()
 
     def _verify_rtstool(self):
@@ -546,18 +545,12 @@ class LioAdm(TargetAdmin):
         if chap_auth is not None:
             (chap_auth_userid, chap_auth_password) = chap_auth.split(' ')[1:]
 
-        extra_args = []
-        if self.lio_initiator_iqns:
-            extra_args.append(self.lio_initiator_iqns)
-
         try:
             command_args = ['create',
                             path,
                             name,
                             chap_auth_userid,
                             chap_auth_password]
-            if extra_args:
-                command_args.extend(extra_args)
             self._run('cinder-rtstool', *command_args, run_as_root=True)
         except putils.ProcessExecutionError as e:
             LOG.error(_LE("Failed to create iscsi target for volume "
index 00153de5c4c81a4cf05e6bdd2f750f95a89fb709..4bb29c998d75464a800ce195687d3b4574ffb006 100644 (file)
@@ -38,7 +38,6 @@ def set_defaults(conf):
     conf.set_default('volume_driver',
                      'cinder.tests.fake_driver.FakeISCSIDriver')
     conf.set_default('iscsi_helper', 'fake')
-    conf.set_default('fake_rabbit', True)
     conf.set_default('rpc_backend', 'cinder.openstack.common.rpc.impl_fake')
     conf.set_default('iscsi_num_targets', 8)
     conf.set_default('connection', 'sqlite://', group='database')
index d7ea62a8bd5647e399e06684103724507dbe1c7e..db7d39d185c91c3e8678e799d52d0be667ecd2b5 100755 (executable)
@@ -92,9 +92,8 @@ volume_opts = [
                help='IET configuration file'),
     cfg.StrOpt('lio_initiator_iqns',
                default='',
-               help=('Comma-separated list of initiator IQNs '
-                     'allowed to connect to the '
-                     'iSCSI target. (From Nova compute nodes.)')),
+               help='This option is deprecated and unused. '
+                    'It will be removed in the next release.'),
     cfg.StrOpt('iscsi_iotype',
                default='fileio',
                help=('Sets the behavior of the iSCSI target '
@@ -1122,9 +1121,7 @@ class ISCSIDriver(VolumeDriver):
         elif CONF.iscsi_helper == 'fake':
             return iscsi.FakeIscsiHelper()
         elif CONF.iscsi_helper == 'lioadm':
-            return iscsi.LioAdm(root_helper,
-                                CONF.lio_initiator_iqns,
-                                CONF.iscsi_target_prefix, db=db)
+            return iscsi.LioAdm(root_helper, CONF.iscsi_target_prefix, db=db)
         else:
             return iscsi.IetAdm(root_helper, CONF.iet_conf, CONF.iscsi_iotype,
                                 db=db)
index 905edac1bea06c8b9548367a9617f1c16c3188d9..f25d528af19b90d022e1924830ee2f3765dfb1e3 100644 (file)
@@ -13,7 +13,7 @@
 from oslo.concurrency import processutils as putils
 
 from cinder import exception
-from cinder.i18n import _, _LI, _LE
+from cinder.i18n import _, _LE, _LI, _LW
 from cinder.openstack.common import log as logging
 from cinder.volume.targets.tgt import TgtAdm
 
@@ -30,6 +30,11 @@ class LioAdm(TgtAdm):
             self.configuration.safe_get('iscsi_target_prefix')
         self.lio_initiator_iqns =\
             self.configuration.safe_get('lio_initiator_iqns')
+
+        if self.lio_initiator_iqns is not None:
+            LOG.warning(_LW("The lio_initiator_iqns option has been "
+                            "deprecated and no longer has any effect."))
+
         self._verify_rtstool()
 
     def remove_export(self, context, volume):
@@ -93,10 +98,6 @@ class LioAdm(TgtAdm):
         if chap_auth is not None:
             (chap_auth_userid, chap_auth_password) = chap_auth.split(' ')[1:]
 
-        extra_args = []
-        if self.lio_initiator_iqns:
-            extra_args.append(self.lio_initiator_iqns)
-
         try:
             command_args = ['cinder-rtstool',
                             'create',
@@ -104,8 +105,6 @@ class LioAdm(TgtAdm):
                             name,
                             chap_auth_userid,
                             chap_auth_password]
-            if extra_args:
-                command_args.extend(extra_args)
             self._execute(*command_args, run_as_root=True)
         except putils.ProcessExecutionError as e:
             LOG.error(_LE("Failed to create iscsi target for volume "
index e5027cd3b765d229dadc3ffd11e751b172187475..83b3b69fcb31da048566ea524959e051b56ef37d 100644 (file)
 # IET configuration file (string value)
 #iet_conf=/etc/iet/ietd.conf
 
-# Comma-separated list of initiator IQNs allowed to connect to
-# the iSCSI target. (From Nova compute nodes.) (string value)
+# This option is deprecated and unused. It will be removed in
+# the next release. (string value)
 #lio_initiator_iqns=
 
 # Sets the behavior of the iSCSI target to either perform