From 9877025db8b5f90ca0ebeb342cdce5741bc1d943 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Thu, 31 Jul 2014 18:33:28 +0300 Subject: [PATCH] Do not run haproxy in chroot Chroot prevents haproxy from logging into /dev/log and that is an issue. There is no need to run it in chroot as well. Closes-bug: #1350835 Change-Id: Ib161fced734344815035b4ddfcf28bfda11a0cb7 Signed-off-by: Bogdan Dobrelya --- .../puppet/cluster/manifests/haproxy.pp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/deployment/puppet/cluster/manifests/haproxy.pp b/deployment/puppet/cluster/manifests/haproxy.pp index 717378c072..77a4fa0c3d 100644 --- a/deployment/puppet/cluster/manifests/haproxy.pp +++ b/deployment/puppet/cluster/manifests/haproxy.pp @@ -11,12 +11,21 @@ class cluster::haproxy ( package { 'haproxy': } + #NOTE(bogdando) we want defaults w/o chroot + # and this override looks the only possible if + # upstream manifests must be kept intact + $global_options = { + 'log' => '/dev/log local0', + 'pidfile' => '/var/run/haproxy.pid', + 'maxconn' => $haproxy_maxconn, + 'user' => 'haproxy', + 'group' => 'haproxy', + 'daemon' => '', + 'stats' => 'socket /var/lib/haproxy/stats', + } + class { 'haproxy::base': - global_options => merge($::haproxy::params::global_options, - { - 'log' => '/dev/log local0', - 'maxconn' => $haproxy_maxconn - }), + global_options => $global_options, defaults_options => merge($::haproxy::params::defaults_options, {'mode' => 'http'}), use_include => true,