Autopkgtest failure on latest version of initramfs-tools - lack of partprobe

Bug #1893675 reported by Guilherme G. Piccoli
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Medium
Guilherme G. Piccoli
Focal
Fix Released
Medium
Guilherme G. Piccoli
Groovy
Fix Released
Medium
Guilherme G. Piccoli

Bug Description

[Impact]
* Currently the initramfs-tools autopkgtest fails for at least AMD64, with the following signature:
"mount: /tmp/autopkgtest.K1r92h/build.zdS/src/mnt: special device /dev/loop0p1 does not exist."

* The reason for that is the test trying immediately to use that partition on the loop device, but kernel may not have a partition re-read ioctl issued, so the test may fail as observing a nonexistent partition.

* The fix proposed here is just to manually run "partprobe" before using the new to-be-discovered loop partition in the net autopkgtest.

[Test Case]
* Run the autopkgtest suite in the initramfs-tools package and observe the failure aforementioned.

[Regression Potential]
* Extremely low potential, we are just introducing a partition re-read/probe operation during autopkgtest phase, in order to keep the partition table of loop devices consistent before the test uses it.
* The only potential issue I see with that is if for some reason we don't have partprobe in the autopkgtest environment, but that shouldn't happen since parted package is on ubuntu-standard.

* Notice that this test is not executed in Debian CI given that CI has no support for VMs, and this test requires that. [See the Rectification below]

Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

Rectification of my statement in the description: the net test is not present in Debian, only in Ubuntu (Focal and subsequent releases), added in order to perform network parsing test, especially for netplan.

Changed in initramfs-tools (Ubuntu Focal):
status: New → In Progress
Changed in initramfs-tools (Ubuntu Groovy):
importance: Undecided → Medium
Changed in initramfs-tools (Ubuntu Focal):
importance: Undecided → Medium
assignee: nobody → Guilherme G. Piccoli (gpiccoli)
description: updated
Balint Reczey (rbalint)
tags: added: update-excuse
Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

Although the debdiffs are being hereby attached, the SRU track is ongoing in LPs #1879987 and #1879980.

Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :
Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

After discussing with Eric, seems initramfs-tools was "released" in Groovy (even with autopkgtest), so I'm hereby attaching an updated debdiff only with the autopkgtest fix.

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

This bug was fixed in the package initramfs-tools - 0.137ubuntu12

---------------
initramfs-tools (0.137ubuntu12) groovy; urgency=medium

  * d/tests: Add explicit call to partprobe on net test, specially in
    prep-image and run-image. (LP: #1893675)

initramfs-tools (0.137ubuntu11) groovy; urgency=medium

  * scripts/functions: Prevent printf error carry over if the wrong
    console is set. (LP: #1879987)
      The function _log_msg() is "void" typed, returning whatever its
      last command returns. This function is the basic building block
      for all error/warning messages in initramfs-tools. If a bad console
      is provided to kernel on command-line, printf returns error, and so
      this error is carried over in _log_msg(). Happens that checkfs()
      function has a loop that runs forever in this scenario (*if* fsck
      is not present in initramfs and "quiet" is not passed in the
      command-line). If that happens, boot is stuck and cannot progress.
      The simple fix hereby merged is to return zero on _log_msg().

  * scripts/local: Re-execute cryptroot local-block script. (LP: #1879980)
      Currently, if an encrypted rootfs is configured on top of a MD RAID1
      array and such array gets degraded (like a member is removed/failed),
      initramfs-tools cannot mount the rootfs and the boot fails. We fix
      that issue here by allowing cryptroot script to re-run on local-block
      stage, given that mdadm is able to activate a degraded array in that
      point. There is a cryptsetup counter-part for this fix, but alone the
      initramfs-tools portion is innocuous.

 -- <email address hidden> (Guilherme G. Piccoli) Mon, 31 Aug 2020 18:04:00 -0300

Changed in initramfs-tools (Ubuntu Groovy):
status: In Progress → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Guilherme, or anyone else affected,

Accepted initramfs-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.136ubuntu6.3 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 on 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 add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in initramfs-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (initramfs-tools/0.136ubuntu6.3)

All autopkgtests for the newly accepted initramfs-tools (0.136ubuntu6.3) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

initramfs-tools/0.136ubuntu6.3 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#initramfs-tools

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

The ARMHF testing was retried (thanks mfo!) and passed, likely flaky network issues during the test. Also, since Focal was successful to build and no issues on autopkgtest were reported (i.e., no test fails detected), I'm hereby marking this as verified.

Cheers,

Guilherme

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.136ubuntu6.3

---------------
initramfs-tools (0.136ubuntu6.3) focal; urgency=medium

  * scripts/functions: Prevent printf error carry over if the wrong
    console is set. (LP: #1879987)
      The function _log_msg() is "void" typed, returning whatever its
      last command returns. This function is the basic building block
      for all error/warning messages in initramfs-tools. If a bad console
      is provided to kernel on command-line, printf returns error, and so
      this error is carried over in _log_msg(). Happens that checkfs()
      function has a loop that runs forever in this scenario (*if* fsck
      is not present in initramfs and "quiet" is not passed in the
      command-line). If that happens, boot is stuck and cannot progress.
      The simple fix hereby merged is to return zero on _log_msg().

  * scripts/local: Re-execute cryptroot local-block script. (LP: #1879980)
      Currently, if an encrypted rootfs is configured on top of a MD RAID1
      array and such array gets degraded (like a member is removed/failed),
      initramfs-tools cannot mount the rootfs and the boot fails. We fix
      that issue here by allowing cryptroot script to re-run on local-block
      stage, given that mdadm is able to activate a degraded array in that
      point. There is a cryptsetup counter-part for this fix, but alone the
      initramfs-tools portion is innocuous.

  * d/tests: Add explicit call to partprobe on net test, specially in
    prep-image and run-image. (LP: #1893675)

 -- <email address hidden> (Guilherme G. Piccoli) Mon, 31 Aug 2020 13:43:29 -0300

Changed in initramfs-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for initramfs-tools has completed successfully and the package is now being 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 regressions.

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.