I re-verified the fix using systemd/udev 249.11-0ubuntu3.15 from jammy-
proposed:

ubuntu@ubuntu:~$ ls -alh /dev/ptp_kvm 
lrwxrwxrwx 1 root root 4 Feb 28 15:15 /dev/ptp_kvm -> ptp0
ubuntu@ubuntu:~$ sudo udevadm trigger
ubuntu@ubuntu:~$ ls -alh /dev/ptp_kvm 
ls: cannot access '/dev/ptp_kvm': No such file or directory
ubuntu@ubuntu:~$ apt policy udev
udev:
  Installed: 249.11-0ubuntu3.12
  Candidate: 249.11-0ubuntu3.12
  Version table:
 *** 249.11-0ubuntu3.12 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 
Packages
        100 /var/lib/dpkg/status
     249.11-0ubuntu3.7 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     249.11-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
ubuntu@ubuntu:~$ sudo su
root@ubuntu:/home/ubuntu# cat > /etc/apt/sources.list.d/proposed.list << EOF
deb http://archive.ubuntu.com/ubuntu/ jammy-proposed main universe
EOF
root@ubuntu:/home/ubuntu# cat <<EOF >/etc/apt/preferences.d/proposed-updates
Package: *
Pin: release a=jammy-proposed
Pin-Priority: 400
EOF
root@ubuntu:/home/ubuntu# apt update && apt install -y -t jammy-proposed 
systemd udev
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease                   
Hit:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease           
Hit:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease         
Get:5 http://archive.ubuntu.com/ubuntu jammy-proposed InRelease [279 kB]    
Get:6 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages [364 
kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/main i386 Packages [98.8 
kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-proposed/main Translation-en [75.1 
kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 DEP-11 
Metadata [5,720 B]
Get:10 http://archive.ubuntu.com/ubuntu jammy-proposed/main DEP-11 48x48 Icons 
[1,625 B]
Get:11 http://archive.ubuntu.com/ubuntu jammy-proposed/main DEP-11 64x64 Icons 
[2,436 B]
Get:12 http://archive.ubuntu.com/ubuntu jammy-proposed/main DEP-11 64x64@2 
Icons [29 B]
Get:13 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 c-n-f 
Metadata [1,740 B]
Get:14 http://archive.ubuntu.com/ubuntu jammy-proposed/universe i386 Packages 
[32.4 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages 
[85.1 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-proposed/universe Translation-en 
[30.0 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 DEP-11 
Metadata [1,448 B]
Get:18 http://archive.ubuntu.com/ubuntu jammy-proposed/universe DEP-11 48x48 
Icons [4,982 B]
Get:19 http://archive.ubuntu.com/ubuntu jammy-proposed/universe DEP-11 64x64 
Icons [8,742 B]
Get:20 http://archive.ubuntu.com/ubuntu jammy-proposed/universe DEP-11 64x64@2 
Icons [29 B]
Get:21 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 c-n-f 
Metadata [1,344 B]
Fetched 993 kB in 1s (673 kB/s)                                         
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libnss-systemd libpam-systemd libsystemd0 libudev1 systemd-oomd systemd-sysv 
systemd-timesyncd
Suggested packages:
  systemd-container libtss2-rc0
The following packages will be upgraded:
  libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-oomd 
systemd-sysv systemd-timesyncd udev
9 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
Need to get 6,944 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libnss-systemd 
amd64 249.11-0ubuntu3.15 [133 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libsystemd0 
amd64 249.11-0ubuntu3.15 [317 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 
systemd-timesyncd amd64 249.11-0ubuntu3.15 [31.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd-sysv 
amd64 249.11-0ubuntu3.15 [10.5 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd-oomd 
amd64 249.11-0ubuntu3.15 [34.8 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libpam-systemd 
amd64 249.11-0ubuntu3.15 [203 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 systemd amd64 
249.11-0ubuntu3.15 [4,581 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 udev amd64 
249.11-0ubuntu3.15 [1,557 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libudev1 amd64 
249.11-0ubuntu3.15 [76.6 kB]
Fetched 6,944 kB in 1s (6,106 kB/s) 
(Reading database ... 182844 files and directories currently installed.)
Preparing to unpack .../libnss-systemd_249.11-0ubuntu3.15_amd64.deb ...
Unpacking libnss-systemd:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) 
...
Preparing to unpack .../libsystemd0_249.11-0ubuntu3.15_amd64.deb ...
Unpacking libsystemd0:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Setting up libsystemd0:amd64 (249.11-0ubuntu3.15) ...
(Reading database ... 182844 files and directories currently installed.)
Preparing to unpack .../0-systemd-timesyncd_249.11-0ubuntu3.15_amd64.deb ...
Unpacking systemd-timesyncd (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Preparing to unpack .../1-systemd-sysv_249.11-0ubuntu3.15_amd64.deb ...
Unpacking systemd-sysv (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Preparing to unpack .../2-systemd-oomd_249.11-0ubuntu3.15_amd64.deb ...
Unpacking systemd-oomd (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Preparing to unpack .../3-libpam-systemd_249.11-0ubuntu3.15_amd64.deb ...
Unpacking libpam-systemd:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) 
...
Preparing to unpack .../4-systemd_249.11-0ubuntu3.15_amd64.deb ...
Unpacking systemd (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Preparing to unpack .../5-udev_249.11-0ubuntu3.15_amd64.deb ...
Unpacking udev (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Preparing to unpack .../6-libudev1_249.11-0ubuntu3.15_amd64.deb ...
Unpacking libudev1:amd64 (249.11-0ubuntu3.15) over (249.11-0ubuntu3.12) ...
Setting up libudev1:amd64 (249.11-0ubuntu3.15) ...
Setting up systemd (249.11-0ubuntu3.15) ...
Setting up systemd-timesyncd (249.11-0ubuntu3.15) ...
Setting up udev (249.11-0ubuntu3.15) ...
Setting up systemd-oomd (249.11-0ubuntu3.15) ...
Setting up systemd-sysv (249.11-0ubuntu3.15) ...
Setting up libnss-systemd:amd64 (249.11-0ubuntu3.15) ...
Setting up libpam-systemd:amd64 (249.11-0ubuntu3.15) ...
Processing triggers for libc-bin (2.35-0ubuntu3.9) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-52-generic
root@ubuntu:/home/ubuntu# exit
exit
ubuntu@ubuntu:~$ apt policy udev
udev:
  Installed: 249.11-0ubuntu3.15
  Candidate: 249.11-0ubuntu3.15
  Version table:
 *** 249.11-0ubuntu3.15 400
        400 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     249.11-0ubuntu3.12 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 
Packages
     249.11-0ubuntu3.7 500
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     249.11-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
ubuntu@ubuntu:~$ sudo udevadm trigger
ubuntu@ubuntu:~$ ls -alh /dev/ptp_kvm 
lrwxrwxrwx 1 root root 4 Feb 28 15:20 /dev/ptp_kvm -> ptp0
ubuntu@ubuntu:~$ sudo udevadm trigger
ubuntu@ubuntu:~$ ls -alh /dev/ptp_kvm 
lrwxrwxrwx 1 root root 4 Feb 28 15:20 /dev/ptp_kvm -> ptp0
  

** Tags removed: verification-needed-jammy
** Tags added: verification-done-jammy

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2077779

Title:
  PTP device symlink missing after running udevadm trigger command

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Focal:
  Triaged
Status in systemd source package in Jammy:
  Fix Committed
Status in systemd source package in Noble:
  Fix Released
Status in systemd source package in Oracular:
  Fix Released

Bug description:
  [Impact]
  PTP device symlink creation rules are executed only when the udev action is 
'add'.
  If the rules are reloaded and the udevadm trigger command is run to reapply 
changes, the symlink may be deleted.
  This can prevent the chronyd service from restarting properly.

  [Fix]
  Upstream has a patch to fix this issue.

  commit 6bd12be3fa7761f190e17efdbdbff4440da7528b
  Author:     Chengen Du <chengen...@canonical.com>
  CommitDate: Thu Aug 15 15:38:46 2024 +0900

      udev: Handle PTP device symlink properly on udev action 'change'

      PTP device symlink creation rules are currently executed only when the
      udev action is 'add'. If a user reloads the rules and runs the udevadm
      trigger command to reapply changes, the symlink may be deleted, which
      can prevent the chronyd service from restarting properly.

      Signed-off-by: Chengen Du <chengen...@canonical.com>

  [Test Plan]
  1. Create a VM with a PTP device.
  2. Verify that the PTP device symlink is present:
  > ll /dev/ptp*
  crw------- 1 root root 246, 0 Oct 14 02:26 /dev/ptp0
  lrwxrwxrwx 1 root root      4 Oct 14 02:26 /dev/ptp_hyperv -> ptp0
  2. Run the `udevadm trigger` command.
  3. Verify again that the PTP device symlink is still present.

  [Where problems could occur]
  The patch allows PTP device symlink creation rules to be executed when the 
udev action is 'change'.
  This update primarily affects services that rely on the PTP device symlink, 
such as chronyd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2077779/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to