should copy /etc/udev/ rule if available

Bug #1017407 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
Fix Released
Medium
Dimitri John Ledkov
Precise
Fix Released
Medium
Dimitri John Ledkov
Quantal
Fix Released
Medium
Dimitri John Ledkov

Bug Description

[IMPACT]

 * Previously overriding the system mdadm rule was not copied into initramfs, thus had no effect at boot

 * The fix is to check for existence of the mdadm rule override in the /etc/udev/rules.d and copy it into the initramfs in addition to the system udev rule

[TESTCASE]

* Touch the udev rule overrided (Note old package ships two udev rules as per bug 1002357):
* Update the initramfs
* Unpack the initramfs NB! use your correct name for the inird.img file name!
* Search for the udev rule override

$ sudo touch /etc/udev/rules.d/65-mdadm-blkid.rules
$ sudo touch /etc/udev/rules.d/85-mdadm.rules
$ update-initramfs -u
$ cd `mktemp -d` && gzip -dc /boot/initrd.img-3.4.0-5-generic | cpio -ivd
$ find -name '*.rules' -empty
# No output

* Upgrade the package and repeat

$ sudo touch /etc/udev/rules.d/64-md-raid.rules
$ update-initramfs -u
$ cd `mktemp -d` && gzip -dc /boot/initrd.img-3.4.0-5-generic | cpio -ivd
$ find -name '*.rules' -empty
# Expect the location of the empty rules override

[Regression Potential]

 * Systems administrators who by lucky chance where overriding upsteam udev rules name, which previously was not present on Ubuntu, may be surprised or annoyed that their change now got copied into initramfs and affected their boot.

 * Same as in the bug 968074, the default udev rule has changed. Users who relied on the previous, incomplete/broken, udev rules may be pleasantly surprised or annoyed that the udev rule name has changed to match the one of Debian and upstream.

 * System administrators need to check their /etc/udev/rules.d/ to make sure that (a) they do not override mdadm rules (b) if they do, check that those overrides are still needed (c) that the override is named to match the new udev rule name.

Changed in mdadm (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Dmitrijs Ledkovs (dmitrij.ledkov)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mdadm - 3.2.5-1ubuntu2

---------------
mdadm (3.2.5-1ubuntu2) quantal; urgency=low

  * Copy udev rule from /etc/udev/rules.d/ as well as the
    /lib/udev/rules.d/, to allow local administrator to override mdadm
    rules file (LP: #1017407)
 -- Dmitrijs Ledkovs <email address hidden> Mon, 25 Jun 2012 10:43:38 +0100

Changed in mdadm (Ubuntu):
status: Triaged → Fix Released
Changed in mdadm (Ubuntu Precise):
status: New → Triaged
assignee: nobody → Dmitrijs Ledkovs (dmitrij.ledkov)
importance: Undecided → Medium
milestone: none → ubuntu-12.04.1
description: updated
Changed in mdadm (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dmitrijs, or anyone else affected,

Accepted mdadm into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mdadm/3.2.5-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mdadm (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Dmitrijs, or anyone else affected,

Accepted mdadm into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mdadm/3.2.5-1ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Performed the test using initrd.img-3.2.0-23-virtual in Precise virtual machine on HPCloud.
update-initramfs call needs sudo, apart from that everything is correct: previous udev overrides were not copied, but with the proposed package they are.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mdadm - 3.2.5-1ubuntu0.2

---------------
mdadm (3.2.5-1ubuntu0.2) precise-proposed; urgency=low

  * Patch udev-md-raid.rules to not auto-start arrays based on detection
    of ddf or isw (imsm) signatures; this conflicts with dmraid usage in
    precise and requires more analysis before it can be enabled in SRU.
    LP: #1030292.

mdadm (3.2.5-1ubuntu0.1) precise-proposed; urgency=low

  * Stable Micro Point Bug Fix release:
    - SRU master bug (LP: #1009973)
    - Fixes segfault upon update-initramfs (LP: #969384)
    - Fixes does not allow internal bitmap on version 1.2 arrays (LP: #1022915)
  * Preserved previous behaviour, by reverting:
    - bitmap chunk size of 0 will continue to mean 512B
    - Modify the below fix, to accept previous syntax
      "b10c663 config: fix handing of 'homehost' in AUTO line."
  * Use upstream version of udev rules, instead of three slightly
    different ubuntu udev rules (LP: #968074) (LP: #1002357)
  * Add missing mdmon utility. This enables external metadata RAID
    formats: DDF and Intel Matrix Storage Management (IMSM). (LP: #957494)
  * Copy udev rule from /etc/udev/rules.d/ as well as the
    /lib/udev/rules.d/, to allow local administrator to override mdadm
    rules file (LP: #1017407)
  * debian/initramfs/local-premount: add call wait_for_udev to wait a
    little longer for RAID devices to appear. This improves
    boot reliability. (LP: #942106)

mdadm (3.2.5-1) unstable; urgency=low

  [ Michael Tokarev ]
  * new upstream (bugfix) release, fixing regression when --add'ing
    device to an array, introduced in 3.2.4, plus other minor fixes
    (Closes: #673104, #673344)
  * new patch: sha1-includes.diff to fix #include mess in new sha1.h
  * added a check into debian/checkarray to skip checking arrays created
    less than 2 weeks ago (Closes: #624273)

  [ Dmitrijs Ledkovs ]
  * Remove obsolete documentation dating back to ~etch release
  * Remove reference to obsolete documention from debconf templates
  * Update debconf templates translations
  * Remove compatability with acient initramfs-tools
  * Remove debian-specific mdadm-startall.8 in clean target

mdadm (3.2.4-1) unstable; urgency=low

  * new upstream (bugfix) release (Closes: #664088, #661552)
  * removed debian-run-udev.diff (applied upstream), and
    all RUNDIR handling from debian/rules (it is the default now)
  * add build-arch and build-indep targets to debian/rules, and
    bump Standards-Version to 3.9.3

mdadm (3.2.3-3) unstable; urgency=low

  * switch from topgit to plain 3.0 (quilt) layout, creating
    debian/patches. Don't build-depend on quilt as patching
    is done automatically by dpkg-source.
  * debian/patches/debian-run-udev.diff by Roger Leigh (Closes: #644319, #627774)
  * update debian/mdadm.logcheck.ignore.server to recognize "k" in
    addition of "blocks" in kernel messages. Thanks to Frédéric Brière
    for the patch (Closes: #656038)
 -- Steve Langasek <email address hidden> Fri, 03 Aug 2012 23:08:39 -0700

Changed in mdadm (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.