Merge lp://qastaging/~cjwatson/charm-haproxy/listener-address-localhost into lp://qastaging/charm-haproxy

Proposed by Colin Watson
Status: Merged
Approved by: Tom Haddon
Approved revision: 162
Merged at revision: 162
Proposed branch: lp://qastaging/~cjwatson/charm-haproxy/listener-address-localhost
Merge into: lp://qastaging/charm-haproxy
Diff against target: 65 lines (+17/-14)
2 files modified
hooks/hooks.py (+7/-9)
hooks/tests/test_statistics_hooks.py (+10/-5)
To merge this branch: bzr merge lp://qastaging/~cjwatson/charm-haproxy/listener-address-localhost
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Arturo Enrique Seijas Fernández (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+449723@code.qastaging.launchpad.net

Commit message

Set statistics listener-address to 127.0.0.1.

Description of the change

If `listener-address` isn't set on the relation, the telegraf charm defaults to using the unit's `private-address`; but `monitoring_allowed_cidr` defaults to `127.0.0.1/32`, so if telegraf tries to talk to haproxy on the unit's private address then it will get a 403 error unless `monitoring_allowed_cidr` has been specifically configured to allow the unit's private address. Doing that is inconvenient in bundles that are to be deployed in multiple network environments.

The statistics relation has `scope: container`, so the other end of it is always going to be on the same machine, and it makes sense to just advertise 127.0.0.1. This matches the behaviour of the content-cache charm.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Arturo Enrique Seijas Fernández (arturo-seijas) wrote :

LGTM

review: Approve
Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM, thx

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 162

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: