[Enhancement] Requesting a config option to disable use of /dev/ptp0 in chrony

Bug #1927799 reported by Adam Dyess
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NTP Charm
Confirmed
Undecided
Unassigned

Bug Description

The code here in this charm:
https://git.launchpad.net/ntp-charm/tree/reactive/ntp.py#n207

automatically configures chrony to use /dev/ptp0 source if it exists. We've discovered in environments where there is a mix of xenial and bionic machines that xenial does not use this PHC source but bionic does leading the cloud to be skewed from each other. In this event, it would be nice if the charm provided a config option "ignore-phc" so that /dev/ptp0 wouldn't be included in the chrony.conf.

Workaround:
remove PHC from the chrony.conf and chattr +i /etc/chrony/chrony.conf to prevent the charm from making changes.

Revision history for this message
Paul Goins (vultaire) wrote :

I've also hit this in a customer environment.

Two problems:

1. On one affected system, /dev/ptp0 was owned by a NIC which was in the NO-CARRIER state, and was over 8000 hours out of sync. When conditions on the system entered a state where the PHC was somehow preferred, the time shot back from October 18th to May 31st. This system has 10 NICs and /dev/ptp0 through /dev/ptp9. It would be better to somehow be able to pick the /dev/ptp device for a specific NIC rather than assuming /dev/ptp0. (This may also lead to another problem: do we need to rewrite the config on restart in case /dev/ptp* devices are enumerated differently, in order to find the one associated with the correct NIC?)

2. Even after correcting the above with a manual tweak to use a "better" PTP, I found that the PTP sources were giving times which were over 500 seconds out of sync with the configured NTP sources. In other words, the PTP time sources, even if connected, were unreliable for accurate time. In this case, we should have the option to disable them - which is the original bug here.

So, summarizing: we should **at least** allow for enable/disable of this functionality, but **also** it would be good to have some way of leaving it enabled but selecting an more appropriate device for the PHC source.

Changed in ntp-charm:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.