Move auth_strategy to nova class
This commit moves the auth_strategy config from the api class to the nova class. This is required b/c the compute node has to know how to authorize for connections to the glance api server. Previously, the nova compute nodes were failing to be able to communicate with glance on multi-node installations.
This commit is contained in:
parent
32c233347c
commit
cb2f51a855
|
@ -32,16 +32,7 @@ class nova::api(
|
|||
service_name => $::nova::params::api_service_name,
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'api_paste_config': value => '/etc/nova/api-paste.ini';
|
||||
'auth_strategy': value => $auth_strategy;
|
||||
}
|
||||
|
||||
if $auth_strategy == 'keystone' {
|
||||
nova_config { 'use_deprecated_auth': value => false }
|
||||
} else {
|
||||
nova_config { 'use_deprecated_auth': value => true }
|
||||
}
|
||||
nova_config { 'api_paste_config': value => '/etc/nova/api-paste.ini'; }
|
||||
|
||||
file { '/etc/nova/api-paste.ini':
|
||||
content => template('nova/api-paste.ini.erb'),
|
||||
|
|
|
@ -13,6 +13,7 @@ class nova(
|
|||
$rabbit_port='5672',
|
||||
$rabbit_userid='guest',
|
||||
$rabbit_virtual_host='/',
|
||||
$auth_strategy = 'keystone',
|
||||
$network_manager = 'nova.network.manager.FlatManager',
|
||||
$multi_host_networking = false,
|
||||
$flat_network_bridge = 'br100',
|
||||
|
@ -130,6 +131,17 @@ class nova(
|
|||
}
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'auth_strategy': value => $auth_strategy;
|
||||
}
|
||||
|
||||
if $auth_strategy == 'keystone' {
|
||||
nova_config { 'use_deprecated_auth': value => false }
|
||||
} else {
|
||||
nova_config { 'use_deprecated_auth': value => true }
|
||||
}
|
||||
|
||||
|
||||
# I may want to support exporting and collecting these
|
||||
nova_config {
|
||||
'rabbit_password': value => $rabbit_password;
|
||||
|
|
|
@ -36,7 +36,6 @@ describe 'nova::api' do
|
|||
)}
|
||||
end
|
||||
describe 'with defaults' do
|
||||
it { should contain_nova_config('use_deprecated_auth').with_value('false') }
|
||||
it 'should use default params for api-paste.init' do
|
||||
verify_contents(subject, '/etc/nova/api-paste.ini',
|
||||
[
|
||||
|
@ -65,7 +64,6 @@ describe 'nova::api' do
|
|||
:admin_password => 'passw0rd2'
|
||||
}
|
||||
end
|
||||
it { should contain_nova_config('use_deprecated_auth').with_value('true') }
|
||||
it 'should use default params for api-paste.init' do
|
||||
verify_contents(subject, '/etc/nova/api-paste.ini',
|
||||
[
|
||||
|
|
|
@ -77,6 +77,7 @@ describe 'nova' do
|
|||
it { should contain_nova_config('flat_network_bridge').with_value('br100') }
|
||||
|
||||
it { should contain_nova_config('root_helper').with_value('sudo nova-rootwrap') }
|
||||
it { should contain_nova_config('use_deprecated_auth').with_value('false') }
|
||||
|
||||
describe 'with parameters supplied' do
|
||||
|
||||
|
@ -95,10 +96,12 @@ describe 'nova' do
|
|||
'lock_path' => '/var/locky/path',
|
||||
'state_path' => '/var/lib/nova2',
|
||||
'service_down_time' => '120',
|
||||
'network_manager' => 'nova.network.manager.FlatDHCPManager'
|
||||
'network_manager' => 'nova.network.manager.FlatDHCPManager',
|
||||
'auth_strategy' => 'foo'
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_nova_config('use_deprecated_auth').with_value('true') }
|
||||
it { should contain_nova_config('sql_connection').with_value('mysql://user:pass@db/db') }
|
||||
|
||||
it { should contain_nova_config('verbose').with_value(true) }
|
||||
|
|
Loading…
Reference in New Issue