From 47cab2196666196e5614117254c35a1d592b85f3 Mon Sep 17 00:00:00 2001 From: danehans Date: Mon, 22 Jul 2013 16:04:55 +0000 Subject: [PATCH] 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 --- manifests/swift/proxy.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/manifests/swift/proxy.pp b/manifests/swift/proxy.pp index 43a7825..fe973cb 100644 --- a/manifests/swift/proxy.pp +++ b/manifests/swift/proxy.pp @@ -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,