Apple vendor quirk check for LP#1928434 incorrectly fails on all non-DMI hardware

Bug #1931112 reported by Alyssa Rowan
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
Critical
Brian Murray

Bug Description

Test Case
---------
1) On an Ubuntu 20.10 system which does not have /sys/class/dmi run do-release-upgrade
2) Observe a message saying that release upgrades are not allowed

With the version of the release upgrader from -proposed upgrades will be allowed.

Regression Test Case
--------------------
This test is to ensure that the quirk for bug 1929449 still works
1) On Apple hardware running Ubuntu 20.10 run do-release-upgrade -p
2) Observe a message regarding upgrades not being enabled for Apple hardware and the upgrade exit

Regression Potential
--------------------
Its possible that the quirk won't run any more on Apple hardware but we've created a separate test case for that to ensure that it is still working. Additionally, a check has been added to see if '/sys/firmware/efi' exists before running the quirk. Testing that is covered by the regression test case.

Original Description
--------------------
v 1:20.10.16

DistUpgradeQuirks.py, in _test_and_fail_on_apple fails if _readDMIVendor() returns null i.e. if /sys/class/dmi/id/sys_vendor is unknown.

However, this is a very common case - it means almost all non-x86 hardware and many VMs (including my test case, WSL2 20.10 -> 21.04) cannot at the time of writing currently upgrade to 21.04.

This was noted in "Where problems could occur" on https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1929449 where the root cause of this bug was introduced, but seems to have been an intentional emergency 'safe' choice while the shim bug is fixed.

This emergency patch has been in place for 2 weeks now, blocking updates, however the shim-signed bug appears to be fixed now but the quirk is still in place - perhaps the "system vendor is unknown" check should be removed for now, and once verified the quirk removed altogether?

Revision history for this message
Alyssa Rowan (akr) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to remove the "unknown vendor" part of the Apple quirk for now which affects non-Apple hardware, while SRE verifies the shim issue is fixed with Apple hardware" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in ubuntu-release-upgrader (Ubuntu Hirsute):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Brian Murray (brian-murray)
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Fix Released
tags: added: fr-1429
description: updated
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Alyssa, or anyone else affected,

Accepted ubuntu-release-upgrader into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:21.04.13 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-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. 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 ubuntu-release-upgrader (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Dan Bungert (dbungert) wrote :

Disregard, I tested 21.04.12, and I will retest 21.04.13 when available.

Revision history for this message
Dan Bungert (dbungert) wrote :

$ cat DistUpgradeVersion.py
VERSION = '21.04.13'

Test repeated using this version of the hirsute.tar.gz, and as expected both the TUI and Gtk3 versions provide the error that upgrades are not possible at this time.

Revision history for this message
Brian Murray (brian-murray) wrote :

I tested the upgrade on an Ubuntu 20.10 system on which I had bind mounted an empty directory to /sys/class/dmi (sudo mount -o ro,bind dmi /sys/class/dmi). With the version of the release upgrader in -updates I was not able to upgrade to Ubuntu 21.04. Testing the version of the release upgrader in -proposed I was able to upgrade to Ubuntu 21.04.

ubuntu@assured-caribou:/tmp/ubuntu-release-upgrader-cqvcwbjy$ cat DistUpgradeVersion.py
VERSION = '21.04.13'
ubuntu@assured-caribou:/tmp/ubuntu-release-upgrader-cqvcwbjy$ ls -lh /sys/class/dmi/
total 0

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (ubuntu-release-upgrader/1:21.04.13)

All autopkgtests for the newly accepted ubuntu-release-upgrader (1:21.04.13) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-release-upgrader/1:21.04.13 (arm64, s390x, ppc64el, 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/hirsute/update_excuses.html#ubuntu-release-upgrader

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

Thank you!

Revision history for this message
Brian Murray (brian-murray) wrote :

The autopkgtest failure is not related to this SRU and should not block releasing the update. I've modified the version of ubuntu-release-upgrader in the britney hint.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I assume this should be switched to 'verified'. Doing that and releasing early due to the nature of the bug.

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

This bug was fixed in the package ubuntu-release-upgrader - 1:21.04.13

---------------
ubuntu-release-upgrader (1:21.04.13) hirsute; urgency=medium

  * tests/test_sources_list.py: switch from precise to focal (for ports too!)
    as precise was removed from the archive.
  * DistUpgradeQuirks.py: only block upgrades for Apple hardware not all
    hardware that doesn't have DMI information. Thanks to Alyssa Rowan for the
    patch. (LP: #1931112)
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Brian Murray <email address hidden> Mon, 07 Jun 2021 09:12:19 -0700

Changed in ubuntu-release-upgrader (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-release-upgrader 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.