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
This commit is contained in:
Patrick East 2016-06-28 09:58:20 -07:00
parent 57d40f7603
commit 395288aae4
3 changed files with 20 additions and 2 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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.