hyperv: unable to distinguish PTP devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Medium
|
Balint Reczey | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Unassigned | ||
Groovy |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[impact]
the /dev/ptp0 device for a hyperv instance may not be the correct, hyperv-provided, ptp device.
[test case]
on some hyperv instance types, particularly those that might contain passthrough network card(s) that also provide ptp, the first ptp device may not be the correct one to use for ptp, e.g. there may be multiple ones:
$ ls /dev/ptp*
/dev/ptp0 /dev/ptp1
$ cat /sys/class/
hyperv
$ cat /sys/class/
mlx5_p2p
the order can change across boots, so a consistent way of addressing the hyperv-provided one is needed
[regression potential]
any regression would involve failure to properly create the ptp symlink, or other failure while udev is processing newly detected ptp device(s)
[scope]
this is needed in all releases
this was fixed upstream with the commit 32e868f058da8b9
[original description]
Hyperv provides a PTP device. On system with multiple PTP devices, services like Chrony don't have a way to know which one is which.
We would like to have a udev rule to create a symlink to the hyperv clock. This way, services could be configured to always use this clock no matter if it is ptp0, ptp1, etc..
For example:
```
SUBSYSTEM=="ptp", ATTR{clock_
```
tags: | added: rls-hh-incoming |
Changed in systemd (Ubuntu): | |
assignee: | nobody → Balint Reczey (rbalint) |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Fix Committed |
description: | updated |
A similar rule has already been added upstream for KVM PTP device, see: https:/ /github. com/systemd/ systemd/ pull/5495