~xavpaice/ntp-charm:bug/1910340

Last commit made on 2021-05-06
Get this branch:
git clone -b bug/1910340 https://git.launchpad.net/~xavpaice/ntp-charm
Only Xav Paice can upload to this branch. If you are Xav Paice please log in for upload directions.

Branch merges

Branch information

Name:
bug/1910340
Repository:
lp:~xavpaice/ntp-charm

Recent commits

8b347d7... by Xav Paice

Use PHC0 only if in a VM

If a machine is a VM (e.g. KVM or VMware) we will want to use the PHC0
clock as a master source if it's available since we want to sync with
the hypervisor for accuracy. If the host is hardware, we want to ensure
that multiple time sources are available and therefore the PHC device
should not be configured as stratum 0.

This change introduces a test, where the PHC (/dev/ptp0) device is only
used if the host is a VM.

Fixes bug lp:#1910340

ab168b0... by Junien F

Remove the hook templates to avoid update-status churn.

Reviewed-on: https://code.launchpad.net/~axino/ntp-charm/+git/ntp-charm/+merge/397903
Reviewed-by: Nick Moffitt <email address hidden>

59ad3c6... by Junien F

Remove the hook templates to avoid update-status churn.

This is causing update-status to reconfigure everything every time
because the template doesn't have :
hookenv.atexit(basic.clear_config_states)
so the "config.changed" flag is always set.

This commit removes any reference to hook.template - the correct hook
template is provided by the "basic" layer.

7ad6065... by Xav Paice

Add config item and support for setting max_check_attempts for ntpmon checks.

Requires https://github.com/juju/charm-helpers/pull/539

Reviewed-on: https://code.launchpad.net/~xavpaice/ntp-charm/+git/ntp-charm/+merge/394511
Reviewed-by: Haw Loeung <email address hidden>

0d44ce8... by Xav Paice

simplify code for max_check_attempts with NRPE

3d60121... by Xav Paice

Add max_check_attempts support for nrpe checks

Add config item and support for setting max_check_attempts for ntpmon
checks.

48a3fba... by Hua Zhang

/etc/nagios/nrpe.d/check_ntpmon.cfg doesn't exist

Reviewed-on: https://code.launchpad.net/~zhhuabj/ntp-charm/+git/ntp-charm/+merge/394451
Reviewed-by: Tom Haddon <email address hidden>

ae59831... by Hua Zhang

/etc/nagios/nrpe.d/check_ntpmon.cfg doesn't exist

/etc/nagios/nrpe.d/check_ntpmon.cfg can't exist on nagios unit
when monitor_self is set to true, so ntp should handle this case.

LP: #1905531

3c882e6... by Xav Paice

Add support for PHC clock source

Reviewed-on: https://code.launchpad.net/~xavpaice/ntp-charm/+git/ntp-charm/+merge/394722
Reviewed-by: Haw Loeung <email address hidden>

b437688... by Xav Paice

If has PHC, allow config delivery for chrony

If the settings for pools, source and peers are all empty, we drop the
package default config file for chrony. This enables custom config if
PHC is available.

Note that the charm default has pools set.