Mark IET target driver deprecated

This iSCSI target is no longer supported and not included in our
officially supported distributions. This marks the driver as deprecated
so we can remove it in the V release.

Also includes some minor docstring formatting fixes since I was touching
the files.

Change-Id: I0b6262b12907f6472ec7e59b2dd2fc709efd94fc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-01-08 11:01:50 -06:00
parent 3761bb6af8
commit 3c8ff232eb
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
3 changed files with 46 additions and 24 deletions

View File

@ -88,14 +88,17 @@ volume_opts = [
'target support, ietadm for iSCSI Enterprise Target, ' 'target support, ietadm for iSCSI Enterprise Target, '
'iscsictl for Chelsio iSCSI Target, nvmet for NVMEoF ' 'iscsictl for Chelsio iSCSI Target, nvmet for NVMEoF '
'support, spdk-nvmeof for SPDK NVMe-oF, ' 'support, spdk-nvmeof for SPDK NVMe-oF, '
'or fake for testing.'), 'or fake for testing. Note: The IET driver is deprecated '
'and will be removed in the V release.'),
cfg.StrOpt('volumes_dir', cfg.StrOpt('volumes_dir',
default='$state_path/volumes', default='$state_path/volumes',
help='Volume configuration file storage ' help='Volume configuration file storage '
'directory'), 'directory'),
cfg.StrOpt('iet_conf', cfg.StrOpt('iet_conf',
default='/etc/iet/ietd.conf', default='/etc/iet/ietd.conf',
help='IET configuration file'), deprecated_for_removal=True,
deprecated_reason='IET target driver is no longer supported.',
help='DEPRECATED: IET configuration file'),
cfg.StrOpt('chiscsi_conf', cfg.StrOpt('chiscsi_conf',
default='/etc/chelsio-iscsi/chiscsi.conf', default='/etc/chelsio-iscsi/chiscsi.conf',
help='Chiscsi (CXT) global defaults configuration file'), help='Chiscsi (CXT) global defaults configuration file'),
@ -346,26 +349,26 @@ CONF.import_opt('backup_use_same_host', 'cinder.backup.api')
class BaseVD(object): class BaseVD(object):
"""Executes commands relating to Volumes. """Executes commands relating to Volumes.
Base Driver for Cinder Volume Control Path, Base Driver for Cinder Volume Control Path,
This includes supported/required implementation This includes supported/required implementation
for API calls. Also provides *generic* implementation for API calls. Also provides *generic* implementation
of core features like cloning, copy_image_to_volume etc, of core features like cloning, copy_image_to_volume etc,
this way drivers that inherit from this base class and this way drivers that inherit from this base class and
don't offer their own impl can fall back on a general don't offer their own impl can fall back on a general
solution here. solution here.
Key thing to keep in mind with this driver is that it's Key thing to keep in mind with this driver is that it's
intended that these drivers ONLY implement Control Path intended that these drivers ONLY implement Control Path
details (create, delete, extend...), while transport or details (create, delete, extend...), while transport or
data path related implementation should be a *member object* data path related implementation should be a *member object*
that we call a connector. The point here is that for example that we call a connector. The point here is that for example
don't allow the LVM driver to implement iSCSI methods, instead don't allow the LVM driver to implement iSCSI methods, instead
call whatever connector it has configured via conf file call whatever connector it has configured via conf file
(iSCSI{LIO, TGT, IET}, FC, etc). (iSCSI{LIO, TGT, ET}, FC, etc).
In the base class and for example the LVM driver we do this via a has-a In the base class and for example the LVM driver we do this via a has-a
relationship and just provide an interface to the specific connector relationship and just provide an interface to the specific connector
methods. How you do this in your own driver is of course up to you. methods. How you do this in your own driver is of course up to you.
""" """
VERSION = "N/A" VERSION = "N/A"
@ -424,7 +427,7 @@ class BaseVD(object):
# We set these mappings up in the base driver so they # We set these mappings up in the base driver so they
# can be used by children # can be used by children
# (intended for LVM and BlockDevice, but others could use as well) # (intended for LVM, but others could use as well)
self.target_mapping = { self.target_mapping = {
'fake': 'cinder.volume.targets.fake.FakeTarget', 'fake': 'cinder.volume.targets.fake.FakeTarget',
'ietadm': 'cinder.volume.targets.iet.IetAdm', 'ietadm': 'cinder.volume.targets.iet.IetAdm',
@ -2516,9 +2519,9 @@ class VolumeDriver(ManageableVD, CloneableImageVD, ManageableSnapshotsVD,
class ProxyVD(object): class ProxyVD(object):
"""Proxy Volume Driver to mark proxy drivers """Proxy Volume Driver to mark proxy drivers
If a driver uses a proxy class (e.g. by using __setattr__ and If a driver uses a proxy class (e.g. by using __setattr__ and
__getattr__) without directly inheriting from base volume driver this __getattr__) without directly inheriting from base volume driver this
class can help marking them and retrieve the actual used driver object. class can help marking them and retrieve the actual used driver object.
""" """
def _get_driver(self): def _get_driver(self):
"""Returns the actual driver object. """Returns the actual driver object.

View File

@ -16,6 +16,7 @@ import stat
from oslo_concurrency import processutils as putils from oslo_concurrency import processutils as putils
from oslo_log import log as logging from oslo_log import log as logging
from oslo_log import versionutils
from cinder import exception from cinder import exception
import cinder.privsep.targets.iet import cinder.privsep.targets.iet
@ -34,6 +35,11 @@ class IetAdm(iscsi.ISCSITarget):
self.iscsi_iotype = self.configuration.safe_get('iscsi_iotype') self.iscsi_iotype = self.configuration.safe_get('iscsi_iotype')
self.auth_type = 'IncomingUser' self.auth_type = 'IncomingUser'
self.iet_sessions = '/proc/net/iet/session' self.iet_sessions = '/proc/net/iet/session'
versionutils.report_deprecated_feature(
LOG,
'The IET iSCSI target is deprecated and will be removed in the '
'"V" release. It is recommended to use the LIO or TGT targets '
'instead.')
def _get_target(self, iqn): def _get_target(self, iqn):

View File

@ -0,0 +1,13 @@
---
upgrade:
- |
The IET iSCSI target driver has been marked deprecated and will be
removed in the "V" release. The IET iSCSI target project is no longer
active and is not supported by all distributions. It is recommended to
migrate to a supported distribution and iSCSI target prior to upgrading.
deprecations:
- |
The IET iSCSI target driver has been marked deprecated and will be
removed in the "V" release. The IET iSCSI target project is no longer
active and is not supported by all distributions. It is recommended to
migrate to a supported distribution and iSCSI target prior to upgrading.