From dd4ebfad130ec282a100ae49fcd0a6ec7a2be113 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 6 Oct 2017 12:49:33 -0400 Subject: [PATCH] Deprecate allowed_direct_url_schemes and nova.image.download.modules The only in-tree implementation of the nova.image.download.modules extension point was nova.image.download.file which was removed in Pike: I7687cc89545a7a8b295dd6535b4ccebc913a2e0e At the time of that removal, there was an operators ML thread asking if anyone was using this code, or the extension point, and the answer was no (or no answer at all). Since we have no in-tree implementation of this extension point and the extension point itself is not maintained or documented, and even the TransferBase base class was removed in Pike, we should deprecate the extension point and the configuration option associated with its use so that we can simplify our internal glance API client code. Note that the libvirt Rbd image backend which does support direct_url / image locations configuration for fast clones is still supported and unrelated to this code. Change-Id: I13162ebc9050dd2c468d0f8b969b96409f60afa8 --- nova/conf/glance.py | 8 ++++++++ nova/image/download/__init__.py | 10 ++++++++++ ...te-image-download-ext-point-cd5809e11bbd09d3.yaml | 12 ++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 releasenotes/notes/deprecate-image-download-ext-point-cd5809e11bbd09d3.yaml diff --git a/nova/conf/glance.py b/nova/conf/glance.py index 61693b5a5b..c0f456b1be 100644 --- a/nova/conf/glance.py +++ b/nova/conf/glance.py @@ -47,6 +47,14 @@ an image to / from glance. 0 means no retries. """), cfg.ListOpt('allowed_direct_url_schemes', default=[], + deprecated_for_removal=True, + deprecated_since='17.0.0', + deprecated_reason=""" +This was originally added for the 'nova.image.download.file' FileTransfer +extension which was removed in the 16.0.0 Pike release. The +'nova.image.download.modules' extension point is not maintained +and there is no indication of its use in production clouds. +""", help=""" List of url schemes that can be directly accessed. diff --git a/nova/image/download/__init__.py b/nova/image/download/__init__.py index 0b5d3453d7..ae6542cade 100644 --- a/nova/image/download/__init__.py +++ b/nova/image/download/__init__.py @@ -41,4 +41,14 @@ def load_transfer_modules(): else: module_dictionary[scheme] = mgr.driver + if module_dictionary: + LOG.warning('The nova.image.download.modules extension point is ' + 'deprecated for removal starting in the 17.0.0 Queens ' + 'release and may be removed as early as the 18.0.0 Rocky ' + 'release. It is not maintained and there is no indication ' + 'of its use in production clouds. If you are using this ' + 'extension point, please make the nova development team ' + 'aware by contacting us in the #openstack-nova freenode ' + 'IRC channel or on the openstack-dev mailing list.') + return module_dictionary diff --git a/releasenotes/notes/deprecate-image-download-ext-point-cd5809e11bbd09d3.yaml b/releasenotes/notes/deprecate-image-download-ext-point-cd5809e11bbd09d3.yaml new file mode 100644 index 0000000000..ae73ae1f5a --- /dev/null +++ b/releasenotes/notes/deprecate-image-download-ext-point-cd5809e11bbd09d3.yaml @@ -0,0 +1,12 @@ +--- +deprecations: + - | + The ``[glance]/allowed_direct_url_schemes`` configuration option and + ``nova.image.download.modules`` extension point have been deprecated for + removal. These were originally added for the *nova.image.download.file* + FileTransfer extension which was removed in the 16.0.0 Pike release. The + ``nova.image.download.modules`` extension point is not maintained + and there is no indication of its use in production clouds. If you are + using this extension point, please make the nova development team + aware by contacting us in the #openstack-nova freenode IRC channel or + on the openstack-dev mailing list.