From 7c379543ccab831da0bf4f8f4b850b534d5c5247 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Mon, 29 Apr 2019 17:49:48 +0200 Subject: [PATCH] Enable Ceph RGW 'account in url' option This requires an update of the endpoint but is necessary to be able to use public-readable containers (like temporary URLs) with RGW. Change-Id: I6bd11bdf9c74db24c0d21fa600030e9f3b144df0 Closes-Bug: 1826894 --- deployment/ceph-ansible/ceph-base.yaml | 1 + network/endpoints/endpoint_data.yaml | 6 +- network/endpoints/endpoint_map.yaml | 147 +++++++++++++------------ 3 files changed, 82 insertions(+), 72 deletions(-) diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index 9e4bb3a75d..b40643926a 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -365,6 +365,7 @@ resources: rgw_keystone_revocation_interval: '0' rgw_s3_auth_use_keystone: 'true' rgw_swift_versioning_enabled: 'true' + rgw_swift_account_in_url: 'true' - {get_param: CephConfigOverrides} ntp_service_enabled: false generate_fsid: false diff --git a/network/endpoints/endpoint_data.yaml b/network/endpoints/endpoint_data.yaml index 88d9ec138b..ba1c523815 100644 --- a/network/endpoints/endpoint_data.yaml +++ b/network/endpoints/endpoint_data.yaml @@ -309,15 +309,15 @@ CephRgw: Internal: net_param: CephRgw uri_suffixes: - '': /swift/v1 + '': /swift/v1/AUTH_%(project_id)s Public: net_param: Public uri_suffixes: - '': /swift/v1 + '': /swift/v1/AUTH_%(project_id)s Admin: net_param: CephRgw uri_suffixes: - '': /swift/v1 + '': /swift/v1/AUTH_%(project_id)s port: 8080 Sahara: diff --git a/network/endpoints/endpoint_map.yaml b/network/endpoints/endpoint_map.yaml index 2a527c6827..7557d25c89 100644 --- a/network/endpoints/endpoint_map.yaml +++ b/network/endpoints/endpoint_map.yaml @@ -650,29 +650,32 @@ outputs: protocol: get_param: [EndpointMap, CephRgwAdmin, protocol] uri: - make_url: - scheme: - get_param: [EndpointMap, CephRgwAdmin, protocol] - host: - str_replace: - template: - get_param: [EndpointMap, CephRgwAdmin, host] - params: - CLOUDNAME: - get_param: - - CloudEndpoints - - get_param: [ServiceNetMap, CephRgwNetwork] - IP_ADDRESS: - get_param: - - NetIpMap - - str_replace: - params: - NETWORK: - get_param: [ServiceNetMap, CephRgwNetwork] - template: NETWORK_uri - port: - get_param: [EndpointMap, CephRgwAdmin, port] - path: /swift/v1 + list_join: + - '' + - - make_url: + scheme: + get_param: [EndpointMap, CephRgwAdmin, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, CephRgwAdmin, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, CephRgwNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, CephRgwNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, CephRgwAdmin, port] + path: /swift/v1/AUTH_ + - '%(project_id)s' uri_no_suffix: make_url: scheme: @@ -732,29 +735,32 @@ outputs: protocol: get_param: [EndpointMap, CephRgwInternal, protocol] uri: - make_url: - scheme: - get_param: [EndpointMap, CephRgwInternal, protocol] - host: - str_replace: - template: - get_param: [EndpointMap, CephRgwInternal, host] - params: - CLOUDNAME: - get_param: - - CloudEndpoints - - get_param: [ServiceNetMap, CephRgwNetwork] - IP_ADDRESS: - get_param: - - NetIpMap - - str_replace: - params: - NETWORK: - get_param: [ServiceNetMap, CephRgwNetwork] - template: NETWORK_uri - port: - get_param: [EndpointMap, CephRgwInternal, port] - path: /swift/v1 + list_join: + - '' + - - make_url: + scheme: + get_param: [EndpointMap, CephRgwInternal, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, CephRgwInternal, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, CephRgwNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, CephRgwNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, CephRgwInternal, port] + path: /swift/v1/AUTH_ + - '%(project_id)s' uri_no_suffix: make_url: scheme: @@ -814,29 +820,32 @@ outputs: protocol: get_param: [EndpointMap, CephRgwPublic, protocol] uri: - make_url: - scheme: - get_param: [EndpointMap, CephRgwPublic, protocol] - host: - str_replace: - template: - get_param: [EndpointMap, CephRgwPublic, host] - params: - CLOUDNAME: - get_param: - - CloudEndpoints - - get_param: [ServiceNetMap, PublicNetwork] - IP_ADDRESS: - get_param: - - NetIpMap - - str_replace: - params: - NETWORK: - get_param: [ServiceNetMap, PublicNetwork] - template: NETWORK_uri - port: - get_param: [EndpointMap, CephRgwPublic, port] - path: /swift/v1 + list_join: + - '' + - - make_url: + scheme: + get_param: [EndpointMap, CephRgwPublic, protocol] + host: + str_replace: + template: + get_param: [EndpointMap, CephRgwPublic, host] + params: + CLOUDNAME: + get_param: + - CloudEndpoints + - get_param: [ServiceNetMap, PublicNetwork] + IP_ADDRESS: + get_param: + - NetIpMap + - str_replace: + params: + NETWORK: + get_param: [ServiceNetMap, PublicNetwork] + template: NETWORK_uri + port: + get_param: [EndpointMap, CephRgwPublic, port] + path: /swift/v1/AUTH_ + - '%(project_id)s' uri_no_suffix: make_url: scheme: