← Back to team overview

touch-packages team mailing list archive

[Bug 1319047] Re: udev rule file naming requirements changed breaking compatibility to Ubuntu 12.04

 

I investigated this issue again and it is more tricky than I initially
thought.

The rules (see attachment) are supposed to create a symbolic link  in
/etc/X11/ (it worked ALWAYS perfectly in Ubuntu 12.04 on the same
hardware). The problem seems to be due to a race condition (and not due
to naming. I initially assumed it is due to naming because the symlink
was succesfully created when I renamed the file from graphics-
xorg.config.rules to graphics-xorg-config.rules and started the system.
Then I deleted the symlink renamed it back to graphics-xorg.config.rules
and the symlink was not created after the next boot).

After much more tries it turns out that the symlink in /etc/X11/ is
sometimes created after booting and sometimes not. I assume that the
symlink is created (not created) when the udev event for my rule is
triggered after (before) the root files system is mounted.

In the meantime I hit a similar issue with another udev rule for an USB
sound device. This rule's action also requires root to be mounted for
its successful execution. When the USB device is cold plugged the action
is sometimes executed successfully and sometimes not. When the device is
hot plugged the action is always executed successfully.

So the subject of the bug should be rephrased to "udev events for cold
plug devices are often triggered before root fs is mounted breaking
compatibility to Ubuntu 12.04"

** Attachment added: "Rules file in /etc/udev/rules.d/"
   https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1319047/+attachment/4201557/+files/graphics-xorg-config.rules

-- 
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/1319047

Title:
  udev rule file naming requirements changed breaking compatibility to
  Ubuntu 12.04

Status in “systemd” package in Ubuntu:
  Incomplete

Bug description:
  Binary package:

    udev:
      Installed: 204-5ubuntu20
      Candidate: 204-5ubuntu20
      Version table:
     *** 204-5ubuntu20 0
            500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
            100 /var/lib/dpkg/status

  Source package:
    systemd 

  Ubuntu release:
    Description:	Ubuntu 14.04 LTS
    Release:	14.04

  
  Expected behavior:

    All rule files in /etc/udev/rules.d/ having the extension '.rules'
  [see udev(7)] should be honored by udevd (as it has been in Ubuntu
  12.04  and as it is still by "udevadm test <syspath>").

  Actual behavior:

    If udev rule file has an additional '.' (dot) in its name (e.g.
  "graphics-xorg.conf.rules) it will be silently ignored by udevd. But
  such a file will not be ignored by "udevadm test <syspath>", which
  even adds to the confusion about why the rule is not working. Also the
  man page udev(7) does not mention any additional/new naming
  requirements.

  How to reproduce:

    Create or rename a rule file in /etc/udev/rules.d/ so that its name
  contains an additional '.' (dot) (beside the one in '.rules', e.g.
  'graphics-xorg.conf.rules') and run "udevadm control --reload". From
  now on the udev rules in that file will be ignored silently by udevd
  (but not by 'udevadm test <syspath>'!).

  How to solve this issue:

    (1) Revert to the old behavior and make udevd honor rule file names as in Ubuntu 12.04 (preferred alternative)
    __OR__
    (2) If this change has been introduced intentionally then 
       (2a) Announce it (e.g. in a changelog and/or upgrade guide so that users/admins know about it and can rename their rule files not matching the changed needs)
       (2b) Change the code of "udevadm test" (and possibly other tools) to behave consistently so that users have a chance to narrow down the naming issue
       (2c) Add the changed naming requirement to man page udev(7), info files, tutorials... 

  Urgency/Importance:
    Normal

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