Closed bchedotel closed 5 months ago
@insatomcat could you confirm that you also have this issue on your side ?
A solution to the problem has been found. First of all, the ip address provided to chrony didn't work, so I changed it. Secondly, it seemed that the problem was due to a UTC / TAI difference between the publisher's system clock and that of the hypervisor, so I added an offset of 37 seconds on the publisher.
Context
With the aim of setting up latency tests in the Seapath CI, I have the following setup:
The publisher will send SV to a test Virtual VM on the hypervisor. The clock systems are synchronized in PTP using the tools provided by LinuxPTP (ptp4l and phc2sys), with timemaster chosen to enable NTP backup.
SVs are sent to the VM in PCI-passthrough, and its system clock is synchronized by
ptp_kvm
, which synchronizes it with the hypervisor's system clock.The publisher configurations for ptp4l and phc2sys are as follows:
where the configuration file is:
and:
On the hypervisor side, we use timemaster, with the following configuration file:
Finally, thanks to
ptp_kvm
, which creates a ptp device in the VM, we can synchronize the clock system with it:Problem
Using the command:
$ phc_ctl <phc_device> cmp
to compare the offset between the system clock and the PHC, we observe good synchronization of a few nanoseconds for the publisher and VM system clocks, while the hypervisor clock is completely out of sync:We can also verify this by taking a look at the phc2sys systemd logs:
Investigations
The problem seems to come from the phc2sys automatic mode imposed by timemaster and the use of chrony. In fact when you bypass the problem by adding phc2sys options in the timemaster configuration file [^1]: [^1]:double dash lets us drop the phc2sys options imposed by timemaster, which follow the options we can add using the configuration file.
and remove chrony, we get a synchronized system clock:
Questions
If my reasoning is correct, why are chrony and phc2sys' automatic mode preventing timemaster from working properly, and how can this be fixed? If not, what kind of misconfiguration could I have made?
Thank you in advance for your attention to my issue.