I tried a simple case of bringing up two lxd containers, one with haproxy as the frontend, another one with just apache as the backend, and this config file on the frontend:
(defaults from the package go here)
frontend mycontainer
bind *:9090
mode http
default_backend myapache
backend myapache
mode http
balance roundrobin
server apache-1 bionic-backend.lxd:80 check
I then rebooted this frontend and it picked up the bionic-backend.lxd ip just fine via dns.
This sounds indeed like some sort of race condition during boot. It happens only after you reboot a machine? After the boot, if you login and issue a "systemctl restart haproxy", it then works?
Could you share some details about the networking setup of this machine? For example:
cat /etc/network/interfaces /etc/network/interfaces.d/*
cat /etc/netplan/*.yaml
cat /etc/hosts
cat /etc/resolv.conf
Also, does this machine have a wired network connection, or does it depend on wifi and someone logging in on gnome to activate network-manager and its wifi connection?
Thanks for filing this bug in Ubuntu.
I tried a simple case of bringing up two lxd containers, one with haproxy as the frontend, another one with just apache as the backend, and this config file on the frontend:
(defaults from the package go here)
frontend mycontainer
bind *:9090
mode http
default_backend myapache
backend myapache backend. lxd:80 check
mode http
balance roundrobin
server apache-1 bionic-
I then rebooted this frontend and it picked up the bionic-backend.lxd ip just fine via dns.
This sounds indeed like some sort of race condition during boot. It happens only after you reboot a machine? After the boot, if you login and issue a "systemctl restart haproxy", it then works?
Could you share some details about the networking setup of this machine? For example: interfaces /etc/network/ interfaces. d/*
cat /etc/network/
cat /etc/netplan/*.yaml
cat /etc/hosts
cat /etc/resolv.conf
Also, does this machine have a wired network connection, or does it depend on wifi and someone logging in on gnome to activate network-manager and its wifi connection?