dist upgrade quirk for linux metapackage crashes if package is not in cache

Bug #1511831 reported by Brian Murray on 2015-10-30
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
High
Brian Murray
Wily
High
Brian Murray

Bug Description

The Ubuntu Error Tracker has some reports indicating the release upgrader can crash when running the install_linux_metapackage quirk. Here is the Traceback:

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-tsk6132y/wily", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeMain.py", line 240, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeController.py", line 1837, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeController.py", line 1790, in fullUpgrade
    if not self.askDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeController.py", line 978, in askDistUpgrade
    if not self.cache.distUpgrade(self._view, self.serverMode, self._partialUpgrade):
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeCache.py", line 215, in wrapper
    res = f(*args, **kwargs)
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeCache.py", line 624, in distUpgrade
    self.post_upgrade_rule()
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeCache.py", line 463, in post_upgrade_rule
    self.quirks.run("PostDistUpgradeCache")
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeQuirks.py", line 102, in run
    func()
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeQuirks.py", line 136, in wilyPostDistUpgradeCache
    self._install_linux_metapackage()
  File "/tmp/ubuntu-release-upgrader-tsk6132y/DistUpgrade/DistUpgradeQuirks.py", line 660, in _install_linux_metapackage
    if not cache[linux_metapackage].is_installed:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 205, in __getitem__
    raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'linux-rpi2'"

These are the buckets:
https://errors.ubuntu.com/problem/37aa9dc242cd00bad6a1f3b598e883b860754d29
https://errors.ubuntu.com/problem/ab6522ce1b227b12711e3d624d0cf780660e0b23
https://errors.ubuntu.com/problem/994bf05fae85fbcd44f721495db6518f2d5a126d

Related branches

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: New → Triaged
tags: added: wily xenial
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Changed in ubuntu-release-upgrader (Ubuntu Wily):
status: New → Triaged
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-release-upgrader (1:16.04.2) xenial; urgency=medium

  * DistUpgrade/DistUpgradeQuirks.py: protect against the linux metapackage
    not being available in the cache. (LP: #1511831)

 -- Brian Murray <email address hidden> Mon, 02 Nov 2015 09:50:02 -0800

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Wily):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress

Hello Brian, or anyone else affected,

Accepted ubuntu-release-upgrader into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:15.10.14.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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 ubuntu-release-upgrader (Ubuntu Wily):
status: In Progress → Fix Committed
tags: added: verification-needed
rctay (rctay89) wrote :

To get this fix, one has to run do-release-upgrade with --proposed/-p, instead of apt-get install ubuntu-release-upgrader-core/wily-proposed, is this correct? Would the first lead to ubuntu being upgraded to wily-proposed instead of wily?

On Sun, Nov 08, 2015 at 10:15:06AM -0000, rctay wrote:
> To get this fix, one has to run do-release-upgrade with --proposed/-p,
> instead of apt-get install ubuntu-release-upgrader-core/wily-proposed,
> is this correct?

Yes, it is true that you need to use the -p switch.

> Would the first lead to ubuntu being upgraded to wily- proposed
> instead of wily?

No, using the -p switch does not affect enabling proposed. However, if
you already have it enabled it will remain enabled.

--
Brian Murray

Brian Murray (brian-murray) wrote :

The three error buckets that are linked to in the description do not show any crashes using the new version of ubuntu-release-upgrader. Additionally, looking at the crashes about ubuntu-release-upgrader in the error tracker we don't see this crash with the version from wily-proposed. As such I am marking this as verification-done.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-release-upgrader (1:15.10.14.2) wily-proposed; urgency=medium

  * DistUpgrade/DistUpgradeQuirks.py: protect against the linux metapackage
    not being available in the cache. (LP: #1511831)

 -- Brian Murray <email address hidden> Wed, 04 Nov 2015 13:25:30 -0800

Changed in ubuntu-release-upgrader (Ubuntu Wily):
status: Fix Committed → Fix Released

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers