HAProxyContext on Ubuntu 14.04 generates config that fails to start on boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
haproxy (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Won't Fix
|
High
|
James Page |
Bug Description
[Impact]
Valid haproxy configuration directives don't work on trusty as /run/haproxy does not survive reboots and is not-recreated on daemon start.
[Test Case]
sudo apt install haproxy
configure /etc/haproxy.cfg with a admin socket in /run/haproxy:
global
log /var/lib/
log /var/lib/
maxconn 20000
user haproxy
group haproxy
spread-checks 0
stats socket /var/run/
stats timeout 2m
Restart haproxy (will fail as /{,var/}run/haproxy does not exist)
[Regression Potential]
Minimal - same fix is in later package revisions
[Original Bug Report]
While testing upgrades of an Ubuntu 14.04 deployment of OpenStack from ~15.04 to 17.11 charms, I noticed that a number of the OpenStack charmed services failed to start haproxy when I rebooted their units: cinder, glance, keystone, neutron-api, nova-cloud-
The following was in /var/log/boot.log:
[ALERT] 069/225906 (1100) : cannot bind socket for UNIX listener (/var/run/
[ALERT] 069/225906 (1100) : [/usr/sbin/
* Starting haproxy haproxy [fail]
The charm created /var/run/haproxy, but since /var/run (really /run) is a tmpfs, this did not survive the reboot and so haproxy could not create the socket.
I compared the haproxy.cfg the charm creates with the default config shipped by the Ubuntu 16.04 haproxy package, and it seems that charmhelpers/
[agnew(work)] diff -u haproxy-
--- haproxy-
+++ haproxy-
[...]
@@ -50,6 +41,10 @@
haproxy_start()
{
+ [ -d "$RUNDIR" ] || mkdir "$RUNDIR"
+ chown haproxy:haproxy "$RUNDIR"
+ chmod 2775 "$RUNDIR"
+
[...]
charm-helpers or the OpenStack charms or both should be updated so that haproxy will start on boot when running on Ubuntu 14.04.
Changed in haproxy (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in charm-swift-proxy: | |
status: | Triaged → Invalid |
Changed in charm-nova-cloud-controller: | |
status: | Triaged → Invalid |
Changed in charm-neutron-api: | |
status: | Triaged → Invalid |
Changed in charm-keystone: | |
status: | Triaged → Invalid |
Changed in charm-glance: | |
status: | Triaged → Invalid |
Changed in charm-cinder: | |
status: | Triaged → Invalid |
Changed in charm-helpers: | |
status: | Triaged → Invalid |
affects: | charm-helpers → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | charm-swift-proxy → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | charm-neutron-api → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | charm-keystone → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | charm-cinder → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | charm-glance → ubuntu-translations |
no longer affects: | ubuntu-translations |
affects: | charm-nova-cloud-controller → ubuntu-translations |
no longer affects: | ubuntu-translations |
18.02 on Ubuntu 14.04 is also affected.