From eef178e01ce0e5cbd2363646ba3e0c8e9516e442 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Tue, 19 Aug 2014 10:58:52 +0200 Subject: [PATCH] Revert "loadbalancer: use TCP checks for Spice" This patch breaks HAproxy to start: [ALERT] 230/085911 (53231) : parsing [/etc/haproxy/haproxy.cfg:235] : 'http-check' only supports 'disable-on-404', 'send-state', 'expect'. This reverts commit 755851c93889b92e10a9dbddc6f591a7bc6ec01a. --- manifests/loadbalancer.pp | 4 +--- spec/classes/cloud_loadbalancer_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index e25b235d..3c6768d6 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -373,13 +373,11 @@ class cloud::loadbalancer( port => $spice_port, options => { 'balance' => 'leastconn', - 'mode' => 'tcp', - 'option' => ['tcpka', 'forwardfor', 'tcplog',], - 'http-check' => '', 'timeout server' => '120m', 'timeout client' => '120m', }, bind_options => $spice_bind_options, + httpchk => 'httpchk GET /'; } cloud::loadbalancer::binding { 'trove_api_cluster': ip => $trove_api, diff --git a/spec/classes/cloud_loadbalancer_spec.rb b/spec/classes/cloud_loadbalancer_spec.rb index e9f33921..d2b48161 100644 --- a/spec/classes/cloud_loadbalancer_spec.rb +++ b/spec/classes/cloud_loadbalancer_spec.rb @@ -209,10 +209,10 @@ describe 'cloud::loadbalancer' do :ipaddress => [params[:vip_public_ip]], :ports => '6082', :options => { - 'mode' => 'tcp', - 'option' => ['tcpka', 'forwardfor', 'tcplog'], + 'mode' => 'http', + 'option' => ['tcpka', 'forwardfor', 'tcplog','httpchk GET /'], + 'http-check' => 'expect ! rstatus ^5', 'balance' => 'leastconn', - 'http-check' => '', 'timeout server' => '120m', 'timeout client' => '120m' }