From 3c8ff232eb721b259d3becfcacd897eca95e291e Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Wed, 8 Jan 2020 11:01:50 -0600 Subject: [PATCH] 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 --- cinder/volume/driver.py | 51 ++++++++++--------- cinder/volume/targets/iet.py | 6 +++ .../iet-deprecation-f8059417c6adbb78.yaml | 13 +++++ 3 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 releasenotes/notes/iet-deprecation-f8059417c6adbb78.yaml diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 4f28a7eb6ec..0f7ce93eee5 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -88,14 +88,17 @@ volume_opts = [ 'target support, ietadm for iSCSI Enterprise Target, ' 'iscsictl for Chelsio iSCSI Target, nvmet for NVMEoF ' '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', default='$state_path/volumes', help='Volume configuration file storage ' 'directory'), cfg.StrOpt('iet_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', default='/etc/chelsio-iscsi/chiscsi.conf', help='Chiscsi (CXT) global defaults configuration file'), @@ -346,26 +349,26 @@ CONF.import_opt('backup_use_same_host', 'cinder.backup.api') class BaseVD(object): """Executes commands relating to Volumes. - Base Driver for Cinder Volume Control Path, - This includes supported/required implementation - for API calls. Also provides *generic* implementation - of core features like cloning, copy_image_to_volume etc, - this way drivers that inherit from this base class and - don't offer their own impl can fall back on a general - solution here. + Base Driver for Cinder Volume Control Path, + This includes supported/required implementation + for API calls. Also provides *generic* implementation + of core features like cloning, copy_image_to_volume etc, + this way drivers that inherit from this base class and + don't offer their own impl can fall back on a general + solution here. - Key thing to keep in mind with this driver is that it's - intended that these drivers ONLY implement Control Path - details (create, delete, extend...), while transport or - data path related implementation should be a *member object* - that we call a connector. The point here is that for example - don't allow the LVM driver to implement iSCSI methods, instead - call whatever connector it has configured via conf file - (iSCSI{LIO, TGT, IET}, FC, etc). + Key thing to keep in mind with this driver is that it's + intended that these drivers ONLY implement Control Path + details (create, delete, extend...), while transport or + data path related implementation should be a *member object* + that we call a connector. The point here is that for example + don't allow the LVM driver to implement iSCSI methods, instead + call whatever connector it has configured via conf file + (iSCSI{LIO, TGT, ET}, FC, etc). - 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 - methods. How you do this in your own driver is of course up to you. + 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 + methods. How you do this in your own driver is of course up to you. """ VERSION = "N/A" @@ -424,7 +427,7 @@ class BaseVD(object): # We set these mappings up in the base driver so they # 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 = { 'fake': 'cinder.volume.targets.fake.FakeTarget', 'ietadm': 'cinder.volume.targets.iet.IetAdm', @@ -2516,9 +2519,9 @@ class VolumeDriver(ManageableVD, CloneableImageVD, ManageableSnapshotsVD, class ProxyVD(object): """Proxy Volume Driver to mark proxy drivers - If a driver uses a proxy class (e.g. by using __setattr__ and - __getattr__) without directly inheriting from base volume driver this - class can help marking them and retrieve the actual used driver object. + If a driver uses a proxy class (e.g. by using __setattr__ and + __getattr__) without directly inheriting from base volume driver this + class can help marking them and retrieve the actual used driver object. """ def _get_driver(self): """Returns the actual driver object. diff --git a/cinder/volume/targets/iet.py b/cinder/volume/targets/iet.py index 5ab11148ac5..03e1e995eb0 100644 --- a/cinder/volume/targets/iet.py +++ b/cinder/volume/targets/iet.py @@ -16,6 +16,7 @@ import stat from oslo_concurrency import processutils as putils from oslo_log import log as logging +from oslo_log import versionutils from cinder import exception import cinder.privsep.targets.iet @@ -34,6 +35,11 @@ class IetAdm(iscsi.ISCSITarget): self.iscsi_iotype = self.configuration.safe_get('iscsi_iotype') self.auth_type = 'IncomingUser' 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): diff --git a/releasenotes/notes/iet-deprecation-f8059417c6adbb78.yaml b/releasenotes/notes/iet-deprecation-f8059417c6adbb78.yaml new file mode 100644 index 00000000000..2542ac29dfe --- /dev/null +++ b/releasenotes/notes/iet-deprecation-f8059417c6adbb78.yaml @@ -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.