Adds Memcached Support
Previously, nova could only use the in-process cache to store information such as console-auth tokens. This change allows nova to use memcached as a backend to store information. Defaults to false for backwards compatability and allow nova to continue using the in-process cache. Change-Id: If05f04127bc1ec849bec9fd74b2d8027108635e4
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
# Defaults to 'nova.image.local.LocalImageService'
|
||||
# [glance_api_servers] List of addresses for api servers. Optional.
|
||||
# Defaults to localhost:9292.
|
||||
# [memcached_servers] Use memcached instead of in-process cache. Supply a list of memcached server IP's:Memcached Port. Optional. Defaults to false.
|
||||
# [rabbit_host] Location of rabbitmq installation. Optional. Defaults to localhost.
|
||||
# [rabbit_port] Port for rabbitmq instance. Optional. Defaults to 5672.
|
||||
# [rabbit_hosts] Location of rabbitmq installation. Optional. Defaults to undef.
|
||||
@@ -38,6 +39,7 @@ class nova(
|
||||
# these glance params should be optional
|
||||
# this should probably just be configured as a glance client
|
||||
$glance_api_servers = 'localhost:9292',
|
||||
$memcached_servers = false,
|
||||
$rabbit_host = 'localhost',
|
||||
$rabbit_hosts = undef,
|
||||
$rabbit_password='guest',
|
||||
@@ -167,6 +169,12 @@ class nova(
|
||||
|
||||
nova_config { 'DEFAULT/auth_strategy': value => $auth_strategy }
|
||||
|
||||
if $memcached_servers {
|
||||
nova_config { 'DEFAULT/memcached_servers': value => join($memcached_servers, ',') }
|
||||
} else {
|
||||
nova_config { 'DEFAULT/memcached_servers': ensure => absent }
|
||||
}
|
||||
|
||||
if $rpc_backend == 'nova.openstack.common.rpc.impl_kombu' {
|
||||
# I may want to support exporting and collecting these
|
||||
nova_config {
|
||||
|
@@ -146,6 +146,18 @@ describe 'nova' do
|
||||
|
||||
end
|
||||
|
||||
describe 'with memcached parameter supplied' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
'memcached_servers' => ['memcached01:11211', 'memcached02:11211'],
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_nova_config('DEFAULT/memcached_servers').with_value('memcached01:11211,memcached02:11211') }
|
||||
|
||||
end
|
||||
|
||||
|
||||
describe 'with qpid rpc supplied' do
|
||||
|
||||
|
Reference in New Issue
Block a user