From bf375bc8c23d90bdeb274e863b5b5330c99fcd7c Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 6 Feb 2014 17:55:49 +0100 Subject: [PATCH 1/5] cache: drop eth0 binding Close bug #172 Signed-off-by: Emilien Macchi --- manifests/cache.pp | 4 ++-- spec/classes/cloud_cache_spec.rb | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/manifests/cache.pp b/manifests/cache.pp index f81ecbca..77bab724 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -21,11 +21,11 @@ # # [*listen_ip*] # (optional) IP address on which memcached instance should listen -# Default to $::ipaddress_eth0 +# Default in params. # class cloud::cache ( - $listen_ip = $::ipaddress_eth0, + $listen_ip = $os_params::api_eth, ){ class { 'memcached': diff --git a/spec/classes/cloud_cache_spec.rb b/spec/classes/cloud_cache_spec.rb index 54daab28..d0866d22 100644 --- a/spec/classes/cloud_cache_spec.rb +++ b/spec/classes/cloud_cache_spec.rb @@ -22,6 +22,10 @@ describe 'cloud::cache' do shared_examples_for 'cache server' do + let :params do + { :listen_ip => '10.0.0.1' } + end + it 'configure memcached with some params' do should contain_class('memcached').with( :listen_ip => '10.0.0.1', @@ -34,8 +38,7 @@ describe 'cloud::cache' do let :facts do { :osfamily => 'Debian', :memorysize => '1000 MB', - :processorcount => '1', - :ipaddress_eth0 => '10.0.0.1' } + :processorcount => '1' } end it_configures 'cache server' @@ -45,8 +48,7 @@ describe 'cloud::cache' do let :facts do { :osfamily => 'RedHat', :memorysize => '1000 MB', - :processorcount => '1', - :ipaddress_eth0 => '10.0.0.1' } + :processorcount => '1' } end it_configures 'cache server' From 613b41895c24973863a838f610ab86ba4cfd25cd Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 6 Feb 2014 17:57:39 +0100 Subject: [PATCH 2/5] object/ringbuilder: drop eth0 for binding Close #172 Signed-off-by: Emilien Macchi --- manifests/object/ringbuilder.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/object/ringbuilder.pp b/manifests/object/ringbuilder.pp index da0f2fa5..ef88fe09 100644 --- a/manifests/object/ringbuilder.pp +++ b/manifests/object/ringbuilder.pp @@ -17,7 +17,7 @@ # class cloud::object::ringbuilder( - $rsyncd_ipaddress = ipaddress_eth0, + $rsyncd_ipaddress = os_params::api_eth, $replicas = $os_params::replicas, $swift_rsync_max_connections = $os_params::swift_rsync_max_connections, ) { From c651398eb82d0fea35d8ed69422ebe5ad6d1a3a1 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 6 Feb 2014 18:00:40 +0100 Subject: [PATCH 3/5] rbd: drop eth0 for binding Close #172 Signed-off-by: Emilien Macchi --- manifests/storage/rbd/monitor.pp | 2 +- manifests/storage/rbd/osd.pp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/storage/rbd/monitor.pp b/manifests/storage/rbd/monitor.pp index f77fd41b..c17f3cde 100644 --- a/manifests/storage/rbd/monitor.pp +++ b/manifests/storage/rbd/monitor.pp @@ -16,7 +16,7 @@ class cloud::storage::rbd::monitor ( $id = $::uniqueid, - $mon_addr = $::ipaddress_eth0, + $mon_addr = $os_params::api_eth, $monitor_secret = $os_params::ceph_mon_secret ) { diff --git a/manifests/storage/rbd/osd.pp b/manifests/storage/rbd/osd.pp index 6a70e662..7f668d92 100644 --- a/manifests/storage/rbd/osd.pp +++ b/manifests/storage/rbd/osd.pp @@ -14,8 +14,8 @@ # under the License. # class cloud::storage::rbd::osd ( - $public_address = $::ipaddress_eth0, - $cluster_address = $::ipaddress_eth0, + $public_address = $os_params::api_eth, + $cluster_address = $os_params::storage_eth, $devices = ['sdb','sdc'], ) { From 16b9c8b3db847751cfbbf6fe6fc80bb407046954 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 6 Feb 2014 18:02:32 +0100 Subject: [PATCH 4/5] object/ringbuilder: fix typo Close #172 Signed-off-by: Emilien Macchi --- manifests/object/ringbuilder.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/object/ringbuilder.pp b/manifests/object/ringbuilder.pp index ef88fe09..fc90cc86 100644 --- a/manifests/object/ringbuilder.pp +++ b/manifests/object/ringbuilder.pp @@ -17,7 +17,7 @@ # class cloud::object::ringbuilder( - $rsyncd_ipaddress = os_params::api_eth, + $rsyncd_ipaddress = $os_params::api_eth, $replicas = $os_params::replicas, $swift_rsync_max_connections = $os_params::swift_rsync_max_connections, ) { From 1faad8749a49f73662272d45a1044b7fcd09b13d Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 7 Feb 2014 16:01:05 +0100 Subject: [PATCH 5/5] use internal_netif_ip instead of api_eth Close bug #172 Signed-off-by: Emilien Macchi --- manifests/cache.pp | 2 +- manifests/object/ringbuilder.pp | 2 +- manifests/storage/rbd/monitor.pp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/cache.pp b/manifests/cache.pp index 77bab724..b6bb7c32 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -25,7 +25,7 @@ # class cloud::cache ( - $listen_ip = $os_params::api_eth, + $listen_ip = $os_params::internal_netif_ip, ){ class { 'memcached': diff --git a/manifests/object/ringbuilder.pp b/manifests/object/ringbuilder.pp index fc90cc86..c8f440c1 100644 --- a/manifests/object/ringbuilder.pp +++ b/manifests/object/ringbuilder.pp @@ -17,7 +17,7 @@ # class cloud::object::ringbuilder( - $rsyncd_ipaddress = $os_params::api_eth, + $rsyncd_ipaddress = $os_params::internal_netif_ip, $replicas = $os_params::replicas, $swift_rsync_max_connections = $os_params::swift_rsync_max_connections, ) { diff --git a/manifests/storage/rbd/monitor.pp b/manifests/storage/rbd/monitor.pp index c17f3cde..57e8f8a0 100644 --- a/manifests/storage/rbd/monitor.pp +++ b/manifests/storage/rbd/monitor.pp @@ -16,7 +16,7 @@ class cloud::storage::rbd::monitor ( $id = $::uniqueid, - $mon_addr = $os_params::api_eth, + $mon_addr = $os_params::internal_netif_ip, $monitor_secret = $os_params::ceph_mon_secret ) {