From 43fe032a1583ab08a32d8efbe470de754a374607 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Sun, 9 Apr 2017 21:09:59 -0400 Subject: [PATCH] Deprecate CONF.api.allow_instance_snapshots The introduction of this option predates Gerrit [1]. It is not used consistently, since it's not used for createBackup or shelve APIs which also create snapshots. And it's not discoverable. We need to deprecate this option and anyone that cares to disable snapshots needs to do it via policy. [1] https://github.com/openstack/nova/commit/9633e9877c7836c18c30b51c8494abfb025e64ca Change-Id: I321c04376d86ddb1bb3c8f1fa938a7b424e658d0 --- nova/conf/api.py | 8 ++++++++ ...precate-allow_instance_snapshots-c63c45856c902e1e.yaml | 7 +++++++ 2 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/deprecate-allow_instance_snapshots-c63c45856c902e1e.yaml diff --git a/nova/conf/api.py b/nova/conf/api.py index 0f4276d36d..8852a99393 100644 --- a/nova/conf/api.py +++ b/nova/conf/api.py @@ -259,6 +259,14 @@ allow_instance_snapshots_opts = [ cfg.BoolOpt("allow_instance_snapshots", default=True, deprecated_group="DEFAULT", + deprecated_for_removal=True, + deprecated_since="16.0.0", + deprecated_reason="This option disables the createImage server action " + "API in a non-discoverable way and is thus a " + "barrier to interoperability. Also, it is not used " + "for other APIs that create snapshots like shelve " + "or createBackup. Disabling snapshots should be " + "done via policy if so desired.", help=""" Operators can turn off the ability for a user to take snapshots of their instances by setting this option to False. When disabled, any attempt to diff --git a/releasenotes/notes/deprecate-allow_instance_snapshots-c63c45856c902e1e.yaml b/releasenotes/notes/deprecate-allow_instance_snapshots-c63c45856c902e1e.yaml new file mode 100644 index 0000000000..cb6bc0b1de --- /dev/null +++ b/releasenotes/notes/deprecate-allow_instance_snapshots-c63c45856c902e1e.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The ``[api]/allow_instance_snapshots`` configuration option is now + deprecated for removal. To disable snapshots in the ``createImage`` server + action API, change the ``os_compute_api:servers:create_image`` and + ``os_compute_api:servers:create_image:allow_volume_backed`` policies.