relating to haproxy doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Telegraf Charm |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
This is somewhat related to bug 1910974, which is actually still not fixed from what I can see.
On an AWS model, the relation data returned by haproxy will look like :
egress-subnets: 172.31.6.123/32
enabled: "True"
ingress-address: 172.31.6.123
password: REDACTED
port: "10000"
private-address: 172.31.6.123
user: haproxy
And the current telegraf code does :
addr = rel.get(
So the telegraf charm will be configured to check the haproxy statistics via 172.31.6.123:10000.
But, by default, haproxy only allows 127.0.0.1/32 to query the statistics. And so connections to 172.31.6.123 fail.
As @hloeung said in bug 1910974, this is a subordinate charm, so why use anything else than 127.0.0.1 ?
At the very least, the telegraf charm should try actually fetching metrics, and if it doesn't work with the relation data then it should try with 127.0.0.1, and use that if it works.
Thanks
Changed in charm-telegraf: | |
importance: | Undecided → Medium |
Also, the haproxy_input() function is gated with :
@when(" haproxy. available" ) telegraf. installed" ) input(haproxy) :
@when("
def haproxy_
So it will be called for every single hook if haproxy is related. We should gate it with a flag that's set at the end of this function ("haproxy. input.configure d" or something) and unset this flag where appropriate ("config-changed" etc...)