All units (servers) are not added to haproxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-haproxy |
New
|
Undecided
|
Unassigned |
Bug Description
I was relating a haproxy:
(See attached image)
# The problem
The juju-controller application has three units, but in the haproxy.cfg, there is only a single unit. The other two units are not added to the config.
# Below the single haproxy unit - This shows that there are three units of the juju-controller.
juju show-unit haproxy/0
haproxy/0:
machine: "3"
opened-ports:
- 80/tcp
- 443/tcp
- 10000/tcp
public-address: 13.51.194.141
charm: ch:amd64/
leader: true
life: alive
relation-info:
- relation-id: 1
endpoint: peer
related-
application
local-unit:
in-scope: true
data:
- relation-id: 2
endpoint: reverseproxy
related-
application
related-units:
juju-
in-scope: true
data:
hostname: 172.31.19.33
port: "17070"
juju-
in-scope: true
data:
juju-
in-scope: true
data:
# Below the relevant sections from the haproxy-
frontend haproxy-0-443
bind 0.0.0.0:443 ssl crt /var/lib/
default_backend app-controller
mode http
backend app-controller
mode http
balance leastconn
option httpchk GET / HTTP/1.1\r\nHost:\ juju-apiserver\
http-check expect status 101
server juju-controller
description: | updated |
It looks like only one of the units is exposing `port: "17070"` over the relation which I suspect is why haproxy is only connecting to one of them. Possibly this is intended behaviour of the juju-controller charm?