From 444c20d9fc811a58de34bd1694b9f893189dbd16 Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Tue, 26 Feb 2019 11:49:15 +0800 Subject: [PATCH] Deprecates [processing]store_data_location Since the introspection data could be retrieved from inspector API, there is no need to keep an extra link in ironic. This also keeps inspector's behavior consistent by doing so. Change-Id: Ib667afc4f16551b195641888831df7b681217184 Story: 1726713 Task: 11373 --- ironic_inspector/conf/processing.py | 6 +++++- ironic_inspector/plugins/introspection_data.py | 4 +++- .../deprecate-store-data-location-037eaab9cd326646.yaml | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/deprecate-store-data-location-037eaab9cd326646.yaml diff --git a/ironic_inspector/conf/processing.py b/ironic_inspector/conf/processing.py index 502c284a9..678d9695d 100644 --- a/ironic_inspector/conf/processing.py +++ b/ironic_inspector/conf/processing.py @@ -80,7 +80,11 @@ _OPTS = [ 'not be stored.')), cfg.StrOpt('store_data_location', help=_('Name of the key to store the location of stored data ' - 'in the extra column of the Ironic database.')), + 'in the extra column of the Ironic database.'), + deprecated_for_removal=True, + deprecated_reason=_('The introspection data could be retrieved ' + 'from inspector API, there is no need to ' + 'keep an extra link in ironic.')), cfg.BoolOpt('disk_partitioning_spacing', default=True, help=_('Whether to leave 1 GiB of disk size untouched for ' diff --git a/ironic_inspector/plugins/introspection_data.py b/ironic_inspector/plugins/introspection_data.py index 6f51d6b7b..0519390a3 100644 --- a/ironic_inspector/plugins/introspection_data.py +++ b/ironic_inspector/plugins/introspection_data.py @@ -95,9 +95,11 @@ class SwiftStore(object): LOG.info('Introspection data was stored for node %(node)s in Swift ' 'object %(obj_name)s', {'node': node_uuid, 'obj_name': swift_object_name}) + # TODO(kaifeng) Remove the deprecated store_data_location at Train + # cycle. if CONF.processing.store_data_location: node_info = node_cache.get_node(node_uuid) - # TODO(kaifeng) node_info is not synced back, while we are not + # NOTE(kaifeng) node_info is not synced back, while we are not # using extra in the processing logic, it looks fine at the moment, # but we should consider refactor in a later time. node_info.patch([{'op': 'add', 'path': '/extra/%s' % diff --git a/releasenotes/notes/deprecate-store-data-location-037eaab9cd326646.yaml b/releasenotes/notes/deprecate-store-data-location-037eaab9cd326646.yaml new file mode 100644 index 000000000..b00fa0676 --- /dev/null +++ b/releasenotes/notes/deprecate-store-data-location-037eaab9cd326646.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + Deprecated the configuration option ``[processing]store_data_location``. + The introspection data could be retrieved from inspector, there is no + need to keep an extra link in ironic.