From 395288aae47f7b87cfc8b2ff009a2e2f7af2f390 Mon Sep 17 00:00:00 2001 From: Patrick East Date: Tue, 28 Jun 2016 09:58:20 -0700 Subject: [PATCH] Deprecate defining c-vol backends in DEFAULT We will, in future releases, remove support for this. For now we will log a big warning when someone uses c-vol without an enabled_backends config set. DocImpact: Need to document upgrade path and new recommended config. Implements: blueprint shared-backend-config Change-Id: Idf0a7346ae5d5ae45f9fc05a526ef5d66b162a3f --- cinder/cmd/all.py | 6 +++++- cinder/cmd/volume.py | 6 +++++- ...deprecate-backends-in-default-b9784a2333fe22f2.yaml | 10 ++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/deprecate-backends-in-default-b9784a2333fe22f2.yaml diff --git a/cinder/cmd/all.py b/cinder/cmd/all.py index 33ed5ac0391..a5708f05bc3 100644 --- a/cinder/cmd/all.py +++ b/cinder/cmd/all.py @@ -43,7 +43,7 @@ i18n.enable_lazy() from cinder.cmd import volume as volume_cmd from cinder.common import config # noqa from cinder.db import api as session -from cinder.i18n import _LE, _ +from cinder.i18n import _LE, _, _LW from cinder import objects from cinder import rpc from cinder import service @@ -104,6 +104,10 @@ def main(): session.dispose_engine() launcher.launch_service(server) else: + LOG.warning(_LW('Configuration for cinder-volume does not specify ' + '"enabled_backends", using DEFAULT as backend. ' + 'Support for DEFAULT section to configure drivers ' + 'will be removed in the next release.')) server = service.Service.create(binary='cinder-volume', coordination=True) launcher.launch_service(server) diff --git a/cinder/cmd/volume.py b/cinder/cmd/volume.py index 66464f8dcf3..8ce6eb6e6c1 100644 --- a/cinder/cmd/volume.py +++ b/cinder/cmd/volume.py @@ -44,7 +44,7 @@ i18n.enable_lazy() # Need to register global_opts from cinder.common import config # noqa from cinder.db import api as session -from cinder.i18n import _ +from cinder.i18n import _, _LW from cinder import service from cinder import utils from cinder import version @@ -91,6 +91,10 @@ def main(): launcher.launch_service(server) service_started = True else: + LOG.warning(_LW('Configuration for cinder-volume does not specify ' + '"enabled_backends", using DEFAULT as backend. ' + 'Support for DEFAULT section to configure drivers ' + 'will be removed in the next release.')) server = service.Service.create(binary='cinder-volume', coordination=True) launcher.launch_service(server) diff --git a/releasenotes/notes/deprecate-backends-in-default-b9784a2333fe22f2.yaml b/releasenotes/notes/deprecate-backends-in-default-b9784a2333fe22f2.yaml new file mode 100644 index 00000000000..a3952e1ee50 --- /dev/null +++ b/releasenotes/notes/deprecate-backends-in-default-b9784a2333fe22f2.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - Any Volume Drivers configured in the DEFAULT config stanza should be moved + to their own stanza and enabled via the enabled_backends config option. + The older style of config with DEFAULT is deprecated and will be + removed in future releases. +deprecations: + - Configuring Volume Drivers in the DEFAULT config stanza is not going to be + maintained and will be removed in the next release. All backends should use + the enabled_backends config option with separate stanza's for each.