From df15f5342ac267904cbc8820188c82f18e381b6b Mon Sep 17 00:00:00 2001 From: Martin van Es Date: Wed, 16 Oct 2024 16:34:04 +0200 Subject: [PATCH 1/2] Fix ansible and haproxy for containers --- roles/lb_haproxy/templates/haproxy.cfg.j2 | 1 + start-vm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/lb_haproxy/templates/haproxy.cfg.j2 b/roles/lb_haproxy/templates/haproxy.cfg.j2 index 27271163..d4bc61d5 100644 --- a/roles/lb_haproxy/templates/haproxy.cfg.j2 +++ b/roles/lb_haproxy/templates/haproxy.cfg.j2 @@ -31,6 +31,7 @@ global {% endif %} server-state-file {{haproxy_state_file}} + maxconn 256 defaults log global diff --git a/start-vm b/start-vm index c57cb54f..f5859f8f 100755 --- a/start-vm +++ b/start-vm @@ -191,7 +191,7 @@ if [ "$SKIP_ANSIBLE" ] then echo "Skipping ansible run" else - ansible-galaxy install -r requirements.yml || ansible-galaxy install --force -r requirements.yml + ansible-galaxy collection install -U -r requirements.yml || ansible-galaxy collection install --force -r requirements.yml echo "Starting ansible" export ANSIBLE_FORCE_COLOR=True From 9031e84bbc2a591b481e82236663363a734c27ec Mon Sep 17 00:00:00 2001 From: Martin van Es Date: Thu, 17 Oct 2024 08:09:03 +0200 Subject: [PATCH 2/2] Improve haproxy config fix --- roles/lb_haproxy/templates/haproxy.cfg.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/lb_haproxy/templates/haproxy.cfg.j2 b/roles/lb_haproxy/templates/haproxy.cfg.j2 index d4bc61d5..7ecbc69c 100644 --- a/roles/lb_haproxy/templates/haproxy.cfg.j2 +++ b/roles/lb_haproxy/templates/haproxy.cfg.j2 @@ -31,7 +31,8 @@ global {% endif %} server-state-file {{haproxy_state_file}} - maxconn 256 + maxconn 4000 + ulimit-n 9000 defaults log global