Azure/WALinuxAgent

[RHEL8] chrony service fails to start at boot on Azure VMs if udev has not finished creating /dev/ptp_hyperv symbolic link

yuxisun1217 opened this issue · 3 comments

Description of problem:
On Azure VMs with systemd systemd-239-53.el8 or later(BZ#1991834) chronyd will fail to start at system boot if udev has not completed the creation of the /dev/ptp_hyperv symbolic link.
We want to add this solution(udev rule and chrony conf file) into the WALinuxAgent-udev package:

$ cat /etc/udev/rules.d/99-ptp.rules
SUBSYSTEM=="ptp", TAG+="systemd"
$ cat /etc/systemd/system/chronyd.service.d/override.conf
[Unit]
BindsTo=dev-ptp_hyperv.device
After=dev-ptp_hyperv.device

Version-Release number of selected component (if applicable):

  • RHEL-8.6+
  • WALinuxAgent-udev-2.7.0.6-8.el8_8.noarch

How reproducible:
Sporadic occurrences.

Steps to Reproduce

  1. Deploy Azure VM at RHEL 8.6 or later for systemd-239-53.el8 or greater.
  2. Configure refclock in /etc/chrony.conf to reference /dev/
    refclock PHC /dev/ptp_hyperv poll 3 dpoll -2 offset 0
  3. Reboot system.

@anhvoms could you take a look?

@yuxisun1217:
the udev rule is part of systemd upstream https://github.com/systemd/systemd/pull/28973/files since v255. Maybe backport that change?

The chronyd.service.d/override.conf can only safely be applied when chrony.conf contains the entry you specified
(refclock PHC /dev/ptp_hyperv poll 3 dpoll -2 offset 0). Which package installs your chrony.conf?

Hi @jepio ,

Sorry I just saw your message. I think this chrony.conf comes from the Microsoft document: https://learn.microsoft.com/en-us/azure/virtual-machines/linux/time-sync#chrony

Thanks!