compute: fix memcache configuration
Close bug #256 Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
@@ -63,6 +63,11 @@
|
|||||||
# (optional) Syslog facility to receive log lines
|
# (optional) Syslog facility to receive log lines
|
||||||
# Defaults value in params
|
# Defaults value in params
|
||||||
#
|
#
|
||||||
|
# [*memcache_servers*]
|
||||||
|
# (optionnal) Memcached servers used by Keystone. Should be an array.
|
||||||
|
# Default value in params
|
||||||
|
#
|
||||||
|
|
||||||
class cloud::compute(
|
class cloud::compute(
|
||||||
$nova_db_host = $os_params::nova_db_host,
|
$nova_db_host = $os_params::nova_db_host,
|
||||||
$nova_db_user = $os_params::nova_db_user,
|
$nova_db_user = $os_params::nova_db_user,
|
||||||
@@ -79,6 +84,7 @@ class cloud::compute(
|
|||||||
$neutron_protocol = $os_params::ks_neutron_public_proto,
|
$neutron_protocol = $os_params::ks_neutron_public_proto,
|
||||||
$neutron_password = $os_params::ks_neutron_password,
|
$neutron_password = $os_params::ks_neutron_password,
|
||||||
$neutron_region_name = $os_params::region,
|
$neutron_region_name = $os_params::region,
|
||||||
|
$memcache_servers = $os_params::memcache_servers,
|
||||||
$availability_zone = $os_params::region
|
$availability_zone = $os_params::region
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -97,6 +103,7 @@ class cloud::compute(
|
|||||||
rabbit_hosts => $rabbit_hosts,
|
rabbit_hosts => $rabbit_hosts,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
glance_api_servers => "http://${ks_glance_internal_host}:${glance_api_port}",
|
glance_api_servers => "http://${ks_glance_internal_host}:${glance_api_port}",
|
||||||
|
memcached_servers => $memcache_servers,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
log_facility => $log_facility,
|
log_facility => $log_facility,
|
||||||
@@ -113,6 +120,7 @@ class cloud::compute(
|
|||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/resume_guests_state_on_host_boot': value => true;
|
'DEFAULT/resume_guests_state_on_host_boot': value => true;
|
||||||
'DEFAULT/default_availability_zone': value => $availability_zone;
|
'DEFAULT/default_availability_zone': value => $availability_zone;
|
||||||
|
'DEFAULT/servicegroup_driver': value => 'mc';
|
||||||
}
|
}
|
||||||
|
|
||||||
# Note(EmilienM):
|
# Note(EmilienM):
|
||||||
|
@@ -52,11 +52,6 @@ class cloud::compute::controller(
|
|||||||
host => $api_eth
|
host => $api_eth
|
||||||
}
|
}
|
||||||
|
|
||||||
# Extra configuration for compute controllers:
|
|
||||||
nova_config {
|
|
||||||
'DEFAULT/servicegroup_driver': value => 'mc';
|
|
||||||
}
|
|
||||||
|
|
||||||
@@haproxy::balancermember{"${::fqdn}-compute_api_ec2":
|
@@haproxy::balancermember{"${::fqdn}-compute_api_ec2":
|
||||||
listening_service => 'ec2_api_cluster',
|
listening_service => 'ec2_api_cluster',
|
||||||
server_names => $::hostname,
|
server_names => $::hostname,
|
||||||
|
@@ -39,6 +39,7 @@ describe 'cloud::compute::controller' do
|
|||||||
neutron_endpoint => '10.0.0.1',
|
neutron_endpoint => '10.0.0.1',
|
||||||
neutron_region_name => 'MyRegion',
|
neutron_region_name => 'MyRegion',
|
||||||
neutron_password => 'secrete',
|
neutron_password => 'secrete',
|
||||||
|
memcache_servers => ['10.0.0.1','10.0.0.2'],
|
||||||
log_facility => 'LOG_LOCAL0' }"
|
log_facility => 'LOG_LOCAL0' }"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -63,11 +64,13 @@ describe 'cloud::compute::controller' do
|
|||||||
:rabbit_hosts => ['10.0.0.1'],
|
:rabbit_hosts => ['10.0.0.1'],
|
||||||
:rabbit_password => 'secrete',
|
:rabbit_password => 'secrete',
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
|
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||||
:glance_api_servers => 'http://10.0.0.1:9292'
|
:glance_api_servers => 'http://10.0.0.1:9292'
|
||||||
)
|
)
|
||||||
should contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
should contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||||
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||||
|
should contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure neutron on compute node' do
|
it 'configure neutron on compute node' do
|
||||||
@@ -120,10 +123,6 @@ describe 'cloud::compute::controller' do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure extra parameters' do
|
|
||||||
should contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
|
@@ -39,6 +39,7 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
neutron_endpoint => '10.0.0.1',
|
neutron_endpoint => '10.0.0.1',
|
||||||
neutron_region_name => 'MyRegion',
|
neutron_region_name => 'MyRegion',
|
||||||
neutron_password => 'secrete',
|
neutron_password => 'secrete',
|
||||||
|
memcache_servers => ['10.0.0.1','10.0.0.2'],
|
||||||
log_facility => 'LOG_LOCAL0' }
|
log_facility => 'LOG_LOCAL0' }
|
||||||
class { 'cloud::telemetry':
|
class { 'cloud::telemetry':
|
||||||
ceilometer_secret => 'secrete',
|
ceilometer_secret => 'secrete',
|
||||||
@@ -78,11 +79,13 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
:rabbit_hosts => ['10.0.0.1'],
|
:rabbit_hosts => ['10.0.0.1'],
|
||||||
:rabbit_password => 'secrete',
|
:rabbit_password => 'secrete',
|
||||||
:rabbit_virtual_host => '/',
|
:rabbit_virtual_host => '/',
|
||||||
|
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||||
:glance_api_servers => 'http://10.0.0.1:9292'
|
:glance_api_servers => 'http://10.0.0.1:9292'
|
||||||
)
|
)
|
||||||
should contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
should contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||||
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||||
|
should contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure neutron on compute node' do
|
it 'configure neutron on compute node' do
|
||||||
|
Reference in New Issue
Block a user