Update Rackspace vendor profile for cinder v2
Rackspace only has v1 in the catalog but run a cinder that supports v2. Since SDK doesn't have support for v1 at all, update our vendor config with an endpoint override for their block-storage service. As a special bit of hell, the url needs the project_id appended which we cannot do with our normal format substitutions, so put in YET ANOTHER Rackspace specific workaround logic. Story: 2007459 Task: 39146 Change-Id: I4e6485b936b6b7303b6463cbacd3bf98746fc5e1
This commit is contained in:
parent
60a24f6c47
commit
c6c69fc474
@ -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::
|
||||
|
@ -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(
|
||||
|
3
openstack/config/vendors/rackspace.json
vendored
3
openstack/config/vendors/rackspace.json
vendored
@ -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"
|
||||
|
@ -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``.
|
Loading…
Reference in New Issue
Block a user