2020-03-20 16:44:35 |
Bryan Quigley |
description |
We should default to a setup that will alert in some way that the setup is not working.
1. Deploy ntp charm with invalid ntp servers
2. Note: Juju / Nagios say everything is great
Setting verify_ntp_servers=True by default is a good start, but a more robust nagios check might be useful too. |
We should default to a setup that will alert in some way that the setup is not working.
1. Deploy ntp charm with invalid ntp servers
2. Note: Juju / Nagios say everything is great
Setting verify_ntp_servers=True by default is a good start, but a more robust nagios check might be useful too.
Setup:
juju deploy ubuntu --series xenial u16
juju deploy ubuntu --series bionic u18
juju deploy ubuntu --series focal u20 --force
juju deploy cs:ntp
juju add-relation ntp u16
juju add-relation ntp u18
juju add-relation ntp u20
juju config ntp pools=""
juju config ntp source="1.1.1.1" #Something that doesn't work
Juju status show everything is awesome:
...
Unit Workload Agent Machine Public address Ports Message
u16/0* active idle 0 10.5.0.4 ready
ntp/0* active idle 10.5.0.4 123/udp ntp: Ready
u18/0* active idle 1 10.5.0.31 ready
ntp/1 active idle 10.5.0.31 123/udp chrony: Ready
u20/0* active idle 2 10.5.0.7 ready
ntp/2 active idle 10.5.0.7 123/udp chrony: Ready
If you go ahead and set juju config ntp verify_ntp_servers=true
They all report NTP servers are not reachable: 1.1.1.1. Instead of that option it looks we just need to expose the following commands:
Apparently commands from comment#1 mostly show it's failing.:
juju run --all -- /opt/ntpmon-ntp-charm/check_ntpmon.py --check reach
- MachineId: "0" Stdout: | OK: reachability is nan% | frequency= offset=nan peers=0 reach=nan result=0 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "1" ReturnCode: 2 Stdout: | CRITICAL: reachability is too low (0.00%) - must be greater than 50.00% | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "2" ReturnCode: 2 Stdout: | CRITICAL: reachability is too low (0.00%) - must be greater than 50.00% | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "0" ReturnCode: 2 Stdout: | CRITICAL: No sync peer selected | frequency= offset=nan peers=0 reach=nan result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "1" ReturnCode: 2 Stdout: | CRITICAL: No sync peer selected | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "2" ReturnCode: 2 Stdout: | CRITICAL: No sync peer selected | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime= |
|