Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(loadbalancer): working on noble #410

Closed
wants to merge 7 commits into from
Closed

Conversation

JacobCoffee
Copy link
Member

@JacobCoffee JacobCoffee commented Jul 30, 2024

Description

  • (non) Working loadbalancer on Ubuntu 24.04 Noble

Closes

@JacobCoffee
Copy link
Member Author

Very weird issue with haproxy not installing, and Salt failing to proceed because of this, but a 2nd vagrant up fixes it, it is available in the repos, etc. Troubleshooting...

@JacobCoffee
Copy link
Member Author

JacobCoffee commented Aug 12, 2024

loadbalancer: [ERROR   ] Command 'consul-template' failed with return code: 14
loadbalancer: [ERROR   ] stderr: haproxy: unrecognized service
loadbalancer: 2024/08/12 18:18:50.111644 [ERR] (cli) 1 error occurred:
loadbalancer:       * failed to execute command "service haproxy reload" from "/usr/share/consul-template/templates/haproxy.cfg" => "/etc/haproxy/haproxy.cfg": child: command exited with a non-zero exit status:
loadbalancer:
loadbalancer:     service haproxy reload
loadbalancer:
loadbalancer: This is assumed to be a failure. Please ensure the command
loadbalancer: exits with a zero exit status.
loadbalancer: [ERROR   ] retcode: 14
loadbalancer: [ERROR   ] {'pid': 4668, 'retcode': 14, 'stdout': '', 'stderr': 'haproxy: unrecognized service\n2024/08/12 18:18:50.111644 [ERR] (cli) 1 error occurred:\n\t* failed to execute command "service haproxy reload" from "/usr/share/consul-template/templates/haproxy.cfg" => "/etc/haproxy/haproxy.cfg": child: command exited with a non-zero exit status:\n\n    service haproxy reload\n\nThis is assumed to be a failure. Please ensure the command\nexits with a zero exit status.'}

✗ vs loadbalancer

vagrant@loadbalancer:~$ sudo apt search haproxy
Sorting... Done
Full Text Search... Done
golang-github-armon-go-proxyproto-dev/noble 0.0~git20190211.68259f7-2 all
  Golang package to handle HAProxy Proxy Protocol

haproxy/noble 2.8.5-1ubuntu3 arm64
  fast and reliable load balancing reverse proxy

@ewdurbin
Copy link
Member

ewdurbin commented Aug 12, 2024

I'm not sure why, but it seems that the requisites system has changed some in newer releases of salt. (I am remembering most things with requisites occurring at the end, whereas now it seems to try to execute things as soon as all requisites are fulfilled).

The issue you are pointing to seems to be resolved by

diff --git a/salt/haproxy/init.sls b/salt/haproxy/init.sls
index 74a0942..f398cad 100644
--- a/salt/haproxy/init.sls
+++ b/salt/haproxy/init.sls
@@ -80,6 +80,7 @@ haproxy:
     - mode: "0640"
     - require:
       - pkg: consul-pkgs
+      - pkg: haproxy
 
 
 /usr/local/bin/haproxy-ocsp:

to explicitly require that haproxy is installed before the consul-template configuration is written, and thus before our consul state detects it and tries to act on it.

@JacobCoffee
Copy link
Member Author

Haproxy failing to start

Aug 12 18:57:29 loadbalancer.vagrant.psf.io haproxy[4839]: [ALERT]    (4839) : config : parsing [/etc/haproxy/haproxy.cfg:126] : error detected while parsing ACL 'our_domains' : failed to open pattern file </etc/haproxy/our_domains>.
Aug 12 18:57:29 loadbalancer.vagrant.psf.io haproxy[4839]: [ALERT]    (4839) : config : parsing [/etc/haproxy/haproxy.cfg:129] : error detected while parsing an 'http-request deny' condition : no such ACL : 'our_domains'.
Aug 12 18:57:29 loadbalancer.vagrant.psf.io haproxy[4839]: [ALERT]    (4839) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg

@JacobCoffee
Copy link
Member Author

latest issue is around proxy protocol impl: [ALERT] (4824) : config : parsing [/etc/haproxy/haproxy.cfg:573] : unknown keyword 'send-proxy' in 'listen' section

@ewdurbin
Copy link
Member

Closing in favor of #486

@ewdurbin ewdurbin closed this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infra(OS): loadbalancer to Ubuntu 24.04
2 participants