diff --git a/doc/source/user/config/vendor-support.rst b/doc/source/user/config/vendor-support.rst index bfc01e39d..15d48b338 100644 --- a/doc/source/user/config/vendor-support.rst +++ b/doc/source/user/config/vendor-support.rst @@ -258,7 +258,10 @@ SYD Sydney, NSW * Uploaded Images need properties to not use vendor agent:: :vm_mode: hvm :xenapi_use_agent: False -* Volume API Version is 1 +* Block Storage API Version is 2 +* The Block Storage API supports version 2 but only version 1 is in + the catalog. The Block Storage endpoint is + https://{region_name}.blockstorage.api.rackspacecloud.com/v2/{project_id} * While passwords are recommended for use, API keys do work as well. The `rackspaceauth` python package must be installed, and then the following can be added to clouds.yaml:: diff --git a/openstack/config/cloud_region.py b/openstack/config/cloud_region.py index b44c89afc..4857ba3fe 100644 --- a/openstack/config/cloud_region.py +++ b/openstack/config/cloud_region.py @@ -475,6 +475,18 @@ class CloudRegion(object): # Specifically, looking up a list of projects/domains/system to # scope to. value = auth.get('auth_url') + # Because of course. Seriously. + # We have to override the Rackspace block-storage endpoint because + # only v1 is in the catalog but the service actually does support + # v2. But the endpoint needs the project_id. + service_type = self._service_type_manager.get_service_type( + service_type) + if ( + value + and self.config.get('profile') == 'rackspace' + and service_type == 'block-storage' + ): + value = value + auth.get('project_id') return value def get_endpoint_from_catalog( diff --git a/openstack/config/vendors/rackspace.json b/openstack/config/vendors/rackspace.json index 00a454ff3..53db96284 100644 --- a/openstack/config/vendors/rackspace.json +++ b/openstack/config/vendors/rackspace.json @@ -19,7 +19,8 @@ "floating_ip_source": "None", "secgroup_source": "None", "requires_floating_ip": false, - "block_storage_api_version": "1", + "block_storage_endpoint_override": "https://{region_name}.blockstorage.api.rackspacecloud.com/v2/", + "block_storage_api_version": "2", "disable_vendor_agent": { "vm_mode": "hvm", "xenapi_use_agent": "False" diff --git a/releasenotes/notes/rackspace-block-storage-v2-fe0dd69b9e037599.yaml b/releasenotes/notes/rackspace-block-storage-v2-fe0dd69b9e037599.yaml new file mode 100644 index 000000000..e6b81f92f --- /dev/null +++ b/releasenotes/notes/rackspace-block-storage-v2-fe0dd69b9e037599.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Rackspace Cloud's vendor profile has been updated to use v2 + of the Block Storage API. This introduces an endpoint override + for the service based on ``region_name`` and ``project_id``.