Force trove_auth_url to point to the v3 api URL
After removing keystone API v2, trove requires that trove_auth_url parameter has the v3 URL. Note that versionless url is not valid for trove_auth_url so this patch enforces v3 url even when auth_url is not versioned. Additionally, the default value for auth_url parameter has been updated to point to v3. Change-Id: I8d0e200958c813101d72e180c6da8343b5fcae6e
This commit is contained in:
parent
e156c4136f
commit
aa57603fb4
@ -80,11 +80,11 @@ The `trove_conductor_config` provider is a children of the ini_setting provider.
|
|||||||
|
|
||||||
```puppet
|
```puppet
|
||||||
trove_conductor_config { 'DEFAULT/auth_url' :
|
trove_conductor_config { 'DEFAULT/auth_url' :
|
||||||
value => http://localhost:5000/v2.0,
|
value => http://localhost:5000/v3,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This will write `auth_url=http://localhost:5000/v2.0` in the `[DEFAULT]` section.
|
This will write `auth_url=http://localhost:5000/v3` in the `[DEFAULT]` section.
|
||||||
|
|
||||||
##### name
|
##### name
|
||||||
|
|
||||||
@ -108,11 +108,11 @@ The `trove_guestagent_config` provider is a children of the ini_setting provider
|
|||||||
|
|
||||||
```puppet
|
```puppet
|
||||||
trove_guestagent_config { 'DEFAULT/trove_auth_url' :
|
trove_guestagent_config { 'DEFAULT/trove_auth_url' :
|
||||||
value => http://localhost:5000/v2.0,
|
value => http://localhost:5000/v3,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This will write `trove_auth_url=http://localhost:5000/v2.0` in the `[DEFAULT]` section.
|
This will write `trove_auth_url=http://localhost:5000/v3` in the `[DEFAULT]` section.
|
||||||
|
|
||||||
##### name
|
##### name
|
||||||
|
|
||||||
|
@ -204,8 +204,9 @@ the future release. Please use trove::api::package_ensure instead.")
|
|||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include ::trove::keystone::authtoken
|
include ::trove::keystone::authtoken
|
||||||
|
|
||||||
|
$trove_auth_url = "${regsubst($::trove::keystone::authtoken::auth_uri, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
|
||||||
trove_config {
|
trove_config {
|
||||||
'DEFAULT/trove_auth_url' : value => $::trove::keystone::authtoken::auth_uri;
|
'DEFAULT/trove_auth_url' : value => $trove_auth_url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# (optional) Authentication URL.
|
# (optional) Authentication URL.
|
||||||
# Defaults to 'http://localhost:5000/v2.0'.
|
# Defaults to 'http://localhost:5000/v3'.
|
||||||
#
|
#
|
||||||
# [*conductor_manager*]
|
# [*conductor_manager*]
|
||||||
# (optional) Trove conductor manager.
|
# (optional) Trove conductor manager.
|
||||||
@ -73,7 +73,7 @@ class trove::conductor(
|
|||||||
$log_dir = '/var/log/trove',
|
$log_dir = '/var/log/trove',
|
||||||
$use_syslog = $::os_service_default,
|
$use_syslog = $::os_service_default,
|
||||||
$log_facility = $::os_service_default,
|
$log_facility = $::os_service_default,
|
||||||
$auth_url = 'http://localhost:5000/v2.0',
|
$auth_url = 'http://localhost:5000/v3',
|
||||||
$conductor_manager = 'trove.conductor.manager.Manager',
|
$conductor_manager = 'trove.conductor.manager.Manager',
|
||||||
$workers = $::os_workers,
|
$workers = $::os_workers,
|
||||||
$enable_profiler = $::os_service_default,
|
$enable_profiler = $::os_service_default,
|
||||||
@ -111,8 +111,9 @@ the future release. Please use trove::conductor::package_ensure instead.")
|
|||||||
}
|
}
|
||||||
|
|
||||||
# basic service config
|
# basic service config
|
||||||
|
$trove_auth_url = "${regsubst($auth_url, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
|
||||||
trove_conductor_config {
|
trove_conductor_config {
|
||||||
'DEFAULT/trove_auth_url': value => $auth_url;
|
'DEFAULT/trove_auth_url': value => $trove_auth_url;
|
||||||
'DEFAULT/nova_proxy_admin_user': value => $::trove::nova_proxy_admin_user;
|
'DEFAULT/nova_proxy_admin_user': value => $::trove::nova_proxy_admin_user;
|
||||||
'DEFAULT/nova_proxy_admin_tenant_name': value => $::trove::nova_proxy_admin_tenant_name;
|
'DEFAULT/nova_proxy_admin_tenant_name': value => $::trove::nova_proxy_admin_tenant_name;
|
||||||
'DEFAULT/nova_proxy_admin_pass': value => $::trove::nova_proxy_admin_pass;
|
'DEFAULT/nova_proxy_admin_pass': value => $::trove::nova_proxy_admin_pass;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# (optional) Authentication URL.
|
# (optional) Authentication URL.
|
||||||
# Defaults to 'http://localhost:5000/v2.0'.
|
# Defaults to 'http://localhost:5000/v3'.
|
||||||
#
|
#
|
||||||
# [*swift_url*]
|
# [*swift_url*]
|
||||||
# (optional) Swift URL. If this is unset in the class, Trove will
|
# (optional) Swift URL. If this is unset in the class, Trove will
|
||||||
@ -120,7 +120,7 @@ class trove::guestagent(
|
|||||||
$log_dir = '/var/log/trove',
|
$log_dir = '/var/log/trove',
|
||||||
$use_syslog = $::os_service_default,
|
$use_syslog = $::os_service_default,
|
||||||
$log_facility = $::os_service_default,
|
$log_facility = $::os_service_default,
|
||||||
$auth_url = 'http://localhost:5000/v2.0',
|
$auth_url = 'http://localhost:5000/v3',
|
||||||
$swift_url = $::os_service_default,
|
$swift_url = $::os_service_default,
|
||||||
$swift_service_type = $::os_service_default,
|
$swift_service_type = $::os_service_default,
|
||||||
$default_transport_url = $::trove::default_transport_url,
|
$default_transport_url = $::trove::default_transport_url,
|
||||||
@ -161,9 +161,11 @@ in the future release. Please use trove::guestagent::package_ensure instead.")
|
|||||||
trove::control_exchange instead.")
|
trove::control_exchange instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$trove_auth_url = "${regsubst($auth_url, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
|
||||||
|
|
||||||
# basic service config
|
# basic service config
|
||||||
trove_guestagent_config {
|
trove_guestagent_config {
|
||||||
'DEFAULT/trove_auth_url': value => $auth_url;
|
'DEFAULT/trove_auth_url': value => $trove_auth_url;
|
||||||
'DEFAULT/swift_url': value => $swift_url;
|
'DEFAULT/swift_url': value => $swift_url;
|
||||||
'DEFAULT/swift_service_type': value => $swift_service_type;
|
'DEFAULT/swift_service_type': value => $swift_service_type;
|
||||||
'DEFAULT/root_grant': value => $root_grant;
|
'DEFAULT/root_grant': value => $root_grant;
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
#
|
#
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# (optional) Authentication URL.
|
# (optional) Authentication URL.
|
||||||
# Defaults to 'http://localhost:5000/v2.0'.
|
# Defaults to 'http://localhost:5000/v3'.
|
||||||
#
|
#
|
||||||
# [*heat_url*]
|
# [*heat_url*]
|
||||||
# (optional) URL without the tenant segment.
|
# (optional) URL without the tenant segment.
|
||||||
@ -103,7 +103,7 @@ class trove::taskmanager(
|
|||||||
$use_syslog = $::os_service_default,
|
$use_syslog = $::os_service_default,
|
||||||
$guest_log_file = '/var/log/trove/trove-guestagent.log',
|
$guest_log_file = '/var/log/trove/trove-guestagent.log',
|
||||||
$log_facility = $::os_service_default,
|
$log_facility = $::os_service_default,
|
||||||
$auth_url = 'http://localhost:5000/v2.0',
|
$auth_url = 'http://localhost:5000/v3',
|
||||||
$heat_url = false,
|
$heat_url = false,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$guestagent_config_file = '/etc/trove/trove-guestagent.conf',
|
$guestagent_config_file = '/etc/trove/trove-guestagent.conf',
|
||||||
@ -153,9 +153,11 @@ the future release. Please use trove::default_neutron_networks instead.")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$trove_auth_url = "${regsubst($auth_url, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
|
||||||
|
|
||||||
# basic service config
|
# basic service config
|
||||||
trove_taskmanager_config {
|
trove_taskmanager_config {
|
||||||
'DEFAULT/trove_auth_url': value => $auth_url;
|
'DEFAULT/trove_auth_url': value => $trove_auth_url;
|
||||||
'DEFAULT/nova_proxy_admin_user': value => $::trove::nova_proxy_admin_user;
|
'DEFAULT/nova_proxy_admin_user': value => $::trove::nova_proxy_admin_user;
|
||||||
'DEFAULT/nova_proxy_admin_pass': value => $::trove::nova_proxy_admin_pass;
|
'DEFAULT/nova_proxy_admin_pass': value => $::trove::nova_proxy_admin_pass;
|
||||||
'DEFAULT/nova_proxy_admin_tenant_name': value => $::trove::nova_proxy_admin_tenant_name;
|
'DEFAULT/nova_proxy_admin_tenant_name': value => $::trove::nova_proxy_admin_tenant_name;
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
In queens cycle, Keystone API v2.0 has been retired. Default values for auth_url
|
||||||
|
parameter in the different classes have been changed to point to the v3 URL.
|
@ -62,7 +62,7 @@ describe 'trove::api' do
|
|||||||
is_expected.to contain_trove_config('DEFAULT/bind_port').with_value('8779')
|
is_expected.to contain_trove_config('DEFAULT/bind_port').with_value('8779')
|
||||||
is_expected.to contain_trove_config('DEFAULT/backlog').with_value('4096')
|
is_expected.to contain_trove_config('DEFAULT/backlog').with_value('4096')
|
||||||
is_expected.to contain_trove_config('DEFAULT/trove_api_workers').with_value('8')
|
is_expected.to contain_trove_config('DEFAULT/trove_api_workers').with_value('8')
|
||||||
is_expected.to contain_trove_config('DEFAULT/trove_auth_url').with_value('http://localhost:5000')
|
is_expected.to contain_trove_config('DEFAULT/trove_auth_url').with_value('http://localhost:5000/v3')
|
||||||
is_expected.to contain_trove_config('DEFAULT/nova_proxy_admin_user').with_value('admin')
|
is_expected.to contain_trove_config('DEFAULT/nova_proxy_admin_user').with_value('admin')
|
||||||
is_expected.to contain_trove_config('DEFAULT/nova_proxy_admin_pass').with_value('verysecrete')
|
is_expected.to contain_trove_config('DEFAULT/nova_proxy_admin_pass').with_value('verysecrete')
|
||||||
is_expected.to contain_trove_config('DEFAULT/nova_proxy_admin_tenant_name').with_value('admin')
|
is_expected.to contain_trove_config('DEFAULT/nova_proxy_admin_tenant_name').with_value('admin')
|
||||||
|
@ -127,7 +127,7 @@ describe 'trove::guestagent' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :auth_url => "http://10.0.0.1:5000/v2.0",
|
{ :auth_url => "http://10.0.0.1:5000/",
|
||||||
:swift_url => "http://10.0.0.1:8080/v1/AUTH_",
|
:swift_url => "http://10.0.0.1:8080/v1/AUTH_",
|
||||||
:swift_service_type => 'object-store',
|
:swift_service_type => 'object-store',
|
||||||
:rabbit_host => '10.1.0.1',
|
:rabbit_host => '10.1.0.1',
|
||||||
@ -136,7 +136,7 @@ describe 'trove::guestagent' do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
it 'configures trove-guestagent with custom parameters' do
|
it 'configures trove-guestagent with custom parameters' do
|
||||||
is_expected.to contain_trove_guestagent_config('DEFAULT/trove_auth_url').with_value('http://10.0.0.1:5000/v2.0')
|
is_expected.to contain_trove_guestagent_config('DEFAULT/trove_auth_url').with_value('http://10.0.0.1:5000/v3')
|
||||||
is_expected.to contain_trove_guestagent_config('DEFAULT/swift_url').with_value('http://10.0.0.1:8080/v1/AUTH_')
|
is_expected.to contain_trove_guestagent_config('DEFAULT/swift_url').with_value('http://10.0.0.1:8080/v1/AUTH_')
|
||||||
is_expected.to contain_trove_guestagent_config('DEFAULT/swift_service_type').with_value('object-store')
|
is_expected.to contain_trove_guestagent_config('DEFAULT/swift_service_type').with_value('object-store')
|
||||||
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_host').with_value('10.1.0.1')
|
is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_host').with_value('10.1.0.1')
|
||||||
|
@ -32,7 +32,7 @@ api_extensions_path = trove/extensions/routes
|
|||||||
# These options are for an admin user in your keystone config.
|
# These options are for an admin user in your keystone config.
|
||||||
# It proxies the token received from the user to send to nova via this admin users creds,
|
# It proxies the token received from the user to send to nova via this admin users creds,
|
||||||
# basically acting like the client via that proxy token.
|
# basically acting like the client via that proxy token.
|
||||||
trove_auth_url = <%= @auth_url %>
|
trove_auth_url = <%= @trove_auth_url %>
|
||||||
<%- if @swift_url and @swift_url != "<SERVICE DEFAULT>" -%>
|
<%- if @swift_url and @swift_url != "<SERVICE DEFAULT>" -%>
|
||||||
swift_url = <%= @swift_url %>
|
swift_url = <%= @swift_url %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
Loading…
Reference in New Issue
Block a user