do not allow upgrades to hirsute for Apple hardware

Bug #1929449 reported by Brian Murray
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
High
Brian Murray

Bug Description

Due to LP: #1928434 release upgrades to Hirsute are not currently enabled for any one. However, the release upgrade process is safe for most systems so we should create a distribution upgrade quirk which prevents upgrades to Hirsute which is hardware specific.

[Test Case]
1) On Apple hardware running Ubuntu 20.10 download the release-upgrader tarball from -proposed (http://archive.ubuntu.com/ubuntu/dists/hirsute-proposed/main/dist-upgrader-all/current/hirsute.tar.gz) [This is necessary because upgrades to hirsute aren't enabled yet.]
2) Extract the tarball
3) Run './hirsute --frontend DistUpgradeViewGtk3'
4) Observe a message regarding upgrades not being enabled for Apple hardware and the upgrade exit
5) Run './hirsute --frontend DistUpgradeViewText' and ensure the same message appears.

This should also be tested on not Apple hardware to ensure that upgrades can proceed for those systems.

[Where Problems Could Occur]
The _test_and_fail_on_apple() also will prevent upgrades for systems where /sys/lcass/dmi/id/sys_vendor does not exist which is a new situation. However, until the shim bug is resolved that seems like the safest option for users. After the shim bug is resolved we'll disable this specific quirk.

Additionally, if the quirk is poorly written it could disallow all upgrades but we are testing for this by testing it on non-Apple hardware.

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

This quirk isn't necessary for Impish but the helper method to determine the system vendor could be useful so that was added to DistUpgradeQuirks.py.

https://git.launchpad.net/ubuntu-release-upgrader/commit/?id=d125236cc2e4ec20a61f524c18b106e743355f6c

description: updated
Changed in ubuntu-release-upgrader (Ubuntu Hirsute):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Invalid
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Brian, 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.12 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
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (ubuntu-release-upgrader/1:21.04.12)

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

ubuntu-release-upgrader/1:21.04.12 (armhf, s390x, arm64, ppc64el)
update-manager/1:21.04.10 (armhf, s390x, amd64, arm64, ppc64el)

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 :

I followed the test case in a virtual machine, sys_vendor of QEMU, and was able to upgrade with the dist-upgrader tarball from hirsute-proposed.

bdmurray@clean-groovy-amd64:/tmp/dist-upgrade$ cat DistUpgradeVersion.py
VERSION = '21.04.12'
bdmurray@clean-groovy-amd64:/tmp/dist-upgrade$ cat /sys/class/dmi/id/sys_vendor
QEMU

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

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

---------------
ubuntu-release-upgrader (1:21.10.3) impish; urgency=medium

  * DistUpgradeQuirks.py: add in a method for reading the system vendor out of
    DMI information which then can be used to block upgrades. (LP: #1929449)
  * tests/test_sources_list.py: switch from precise to focal as precise was
    removed from the archive.

 -- Brian Murray <email address hidden> Wed, 26 May 2021 13:25:36 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I simulated Apple hardware by bind mounting a text file which contained "Apple Inc" to /sys/class/dmi/id/sys_vendor and the release upgrade was not allowed as you can see in the attached screenshot.

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

The sys_vendor strings to match was determined by looking at "MachineType" (which is sys_vendor and product_version) from apport collected bug reports in Launchpad and searching for Apple. A sample of bug reports revealed the following:

MachineType: Apple Inc. MacBookPro11,1
MachineType: Apple Inc. Macmini5,1
MachineType: Apple Inc. MacBookPro6,2
MachineType: Apple Inc. MacBookPro5,4
MachineType: Apple Inc. MacBookPro8,1
MachineType: Apple Inc. MacBookPro8,1
MachineType: Apple Inc. MacBookPro11,4
MachineType: Apple Inc. MacBookPro7,1
MachineType: Apple Inc. MacBookPro10,1
MachineType: Apple Inc. MacPro5,1
MachineType: Apple Inc. MacBook2,1
MachineType: Apple Inc. MacBookPro9,2
MachineType: Apple Inc. MacBookPro10,1
MachineType: Apple Inc. MacBookPro12,1
MachineType: Apple Inc. MacBookPro11,3
MachineType: Apple Inc. MacBookPro10,1
MachineType: Apple Inc. MacBookPro11,2
MachineType: Apple Inc. MacBookPro12,1
MachineType: Apple Inc. MacBookPro6,2
MachineType: Apple Inc. Macmini5,1
MachineType: Apple Computer, Inc. MacPro2,1
MachineType: Apple Inc. MacBookPro11,4
MachineType: Apple Inc. MacBookPro12,1
MachineType: Apple Inc. MacBookPro9,2
MachineType: Apple Computer, Inc. MacBookPro1,1
MachineType: Apple Inc. iMac10,1
MachineType: Apple Inc. MacBookAir7,2
MachineType: Apple Inc. MacBook2,1
MachineType: Apple Inc. MacBookPro11,4

So the test in comment #6 should be sufficient to verify this SRU.

tags: added: verification-done verification-done-hirsute
removed: verification-needed verification-needed-hirsute
Revision history for this message
Dan Bungert (dbungert) wrote :

I performed successful SRU verification of this item using a Mid-2009 Macbook Pro.

The Groovy desktop installer didn't boot on this hardware, so I went back to Bionic (Focal was
probably a better choice)

After enough do-release-upgrades to Groovy, I was able to follow the test cases as listed, and both the UI and Text cases provide a suitable error.

$ cat /sys/class/dmi/id/sys_vendor
Apple Inc.

$ cat /sys/class/dmi/id/product_name
MacBookPro5,5

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

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

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

  * DistUpgrade/DevelReleaseAnnouncement: remove warning regarding upgrading
    to hirsute.
  * DistUpgradeQuirks.py: add in a method for reading the system vendor out of
    DMI information which then can be used to block upgrades. (LP: #1929449)
  * DistUpgradeQuirks.py: If the system vendor is Apple do not allow release
    upgrades to 21.04 for the time being. (LP: #1929449)
  * DistUpgradeFetcherCore.py: when upgrading with the text view display the
    release announcement in the terminal. (LP: #1925529)
  * tests/test_dist_upgrade_fetcher_core.py: do not display the release
    announcement during the test.
  * tests/test_sources_list.py: switch from precise to focal and precise was
    removed from the archive.
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Brian Murray <email address hidden> Tue, 11 May 2021 15:03:04 -0700

Changed in ubuntu-release-upgrader (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) 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.

Revision history for this message
Justin "J" Lynn (jaesharp) wrote :

> [Where Problems Could Occur]
> The _test_and_fail_on_apple() also will prevent upgrades for systems where /sys/lcass/dmi/id/sys_vendor does not exist which is a new situation. However, until the shim bug is resolved that seems like the safest option for users. After the shim bug is resolved we'll disable this specific quirk.

I can confirm that this quirk disables upgrades on OpenPOWER hardware (which is not EFI based). Tested with OpenPOWER/Raptor Computing Systems Talos II on groovy.

Revision history for this message
Justin "J" Lynn (jaesharp) wrote :

> I can confirm that this quirk disables upgrades on OpenPOWER hardware (which is not EFI based). Tested with OpenPOWER/Raptor Computing Systems Talos II on groovy.

Please note that OpenPOWER systems do not support DMI. OPAL provides platform metadata in sysfs (platform, vendor make/model and version information can be found under /sys/firmware/devicetree/base/{vendor,model-name,model}).

Revision history for this message
roman (morphays) wrote :

"An upgrade is not possible at this time

Due to a bug in shim, LP: #1928434, upgrades are not currently safe for your hardware.

Once that bug has been resolved you will be able to upgrade to the next release of Ubuntu."

ubuntu 20:10, 07.06.2021, macbook air 6,2 middle 2013

Revision history for this message
Alyssa Rowan (akr) wrote :

I've reported the upgrade-blocking regression caused by the emergency quirk introduced in this bug as https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1931112 - added a patch to remove the unknown-vendor side of the quirk (leaving the block at Apple-only for now, although I think the shim bug might now be fixed?).

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

This is now being addressed via bug 1931112. Thanks for letting us know about the issues with this quirk!

Revision history for this message
Justin "J" Lynn (jaesharp) wrote :

> This is now being addressed via bug 1931112. Thanks for letting us know about the issues with this quirk!

Thank you!

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.