[chrony] allow specifying server, client, and command "bind addresses"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NTP Charm |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
Hi,
chrony can be configure to bind to specific IPs for server traffic ("bindaddress" configuration stanza), client traffic(
We have a use case where we would like to specify bindaddress and bindacqaddress, but the charm doesn't allow this currently.
There are two things to consider here :
- how should that be made configurable ? three config options ? one config option which would have all 3 addresses ?
- what should the values look like ? It can't be IPs, because if multiple units are deployed they will have different IPs. It could be an interface name, but this assumes that said interfaces have a single IP (you can only have one stanza of each for IPv4, and one for IPv6). It could also be a network (e.g. 192.168.0.0/24) and then the charm would find the IP in this network that's present on the server and use that. I guess we could allow the operators to specify either an interface or a network.
And finally, this should work for IPv4 _and_ IPv6.
Thanks !
Related branches
- Tom Haddon: Approve
- Johann David Krister Andersson (community): Needs Fixing
- Canonical IS Reviewers: Pending requested
-
Diff: 327 lines (+237/-2)7 files modified.gitignore (+1/-0)
config.yaml (+10/-0)
reactive/ntp.py (+136/-1)
templates/chrony.conf (+14/-0)
tox.ini (+1/-1)
unit_tests/requirements.txt (+1/-0)
unit_tests/test_ntp_hooks.py (+74/-0)
Changed in ntp-charm: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in ntp-charm: | |
status: | Confirmed → Fix Committed |
Ok, so just to confirm we think the best approach here is to add a charm configuration option called bindaddresses that accepts yaml as follows:
juju config ntp bindaddresses= '{"server" : "eth1", "client": "10.10.0.0/24", "command": "-"}'
We'll need to confirm exactly what that should be translated to in terms of chrony (the default since bionic) and whether ntp supports the same for pre-bionic.