[Enhancement] Requesting a config option to disable use of /dev/ptp0 in chrony
Bug #1927799 reported by
Adam Dyess
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:/
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/
To post a comment you must log in.
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.