Adds Support for a Configuring Memcached

Previously, the memcached listen ip was hard-coded to '127.0.0.1'.
This does not allow users to bind memcached to a routable IP
address.  This is needed to allow memcached to service remote
requests.

The change introduces the memcached_listen_ip and
swift_memcache_servers parameters.  memcached_listen_ip allows
users to specify an IP address for memcached to listen on.
swift_memcache_servers specifies a list (ip:port) of memcached
servers that can be used by the Swift proxy cache service.

Defaults to '127.0.0.1' for backwards compatibility and to have
memcached only listen to local requests (loopback address).

Change-Id: I4287b9a165b5aae4568334b7b97f1bf40696c2f5
This commit is contained in:
danehans
2013-07-22 16:04:55 +00:00
parent 4b9d12e569
commit 47cab21966

View File

@@ -20,7 +20,9 @@ class openstack::swift::proxy (
$package_ensure = 'present',
$controller_node_address = '10.0.0.1',
$keystone_host = '10.0.0.1',
$memcached = true
$memcached = true,
$swift_memcache_servers = ['127.0.0.1:11211'],
$memcached_listen_ip = '127.0.0.1'
) {
if $controller_node_address !='10.0.0.1' {
@@ -36,7 +38,7 @@ class openstack::swift::proxy (
if $memcached {
class { 'memcached':
listen_ip => '127.0.0.1',
listen_ip => $memcached_listen_ip,
}
}
@@ -55,10 +57,13 @@ class openstack::swift::proxy (
class { [
'::swift::proxy::catch_errors',
'::swift::proxy::healthcheck',
'::swift::proxy::cache',
'::swift::proxy::swift3',
]: }
class { 'swift::proxy::cache':
memcache_servers => $swift_memcache_servers,
}
class { '::swift::proxy::ratelimit':
clock_accuracy => $ratelimit_clock_accuracy,
max_sleep_time_seconds => $ratelimit_max_sleep_time_seconds,