diff --git a/nova/conf/cinder.py b/nova/conf/cinder.py index 27346a9f0783..4e2b02549fe2 100644 --- a/nova/conf/cinder.py +++ b/nova/conf/cinder.py @@ -23,7 +23,7 @@ cinder_group = cfg.OptGroup( cinder_opts = [ cfg.StrOpt('catalog_info', - default='volumev2:cinderv2:publicURL', + default='volumev3:cinderv3:publicURL', regex='(\w+):(\w+):(.*?)', help=""" Info to match when looking for cinder in the service catalog. diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index 449f700dfebe..531e32d07da1 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -88,6 +88,11 @@ def cinderclient(context): if version == '1': raise exception.UnsupportedCinderAPIVersion(version=version) + if version == '3': + # TODO(ildikov): Add microversion support for picking up the new + # attach/detach API that was added in 3.27. + version = '3.0' + return cinder_client.Client(version, session=_SESSION, auth=auth, diff --git a/releasenotes/notes/switch-to-cinder-v3-00bdf83e0937dbe5.yaml b/releasenotes/notes/switch-to-cinder-v3-00bdf83e0937dbe5.yaml new file mode 100644 index 000000000000..9033a0b96530 --- /dev/null +++ b/releasenotes/notes/switch-to-cinder-v3-00bdf83e0937dbe5.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + Nova is now configured to use the v3 version of the Cinder API. You need to + ensure that the v3 version of the Cinder API is available and listed in the + service catalog in order to use Nova with the default configuration option. + + The base ``3.0`` version is identical to v2 and it was introduced in the + Newton release of OpenStack. In case you need Nova to continue using the v2 + version you can point it towards that by setting the ``catalog_info`` + option in the ``nova.conf`` file under the ``cinder`` section, like:: + + [cinder] + catalog_info = volumev2:cinderv2:publicURL