universe missing after bionic->cosmic do-release-upgrade

Bug #1822886 reported by Dean Henrichsmeyer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Critical
Brian Murray
Bionic
Fix Released
Critical
Unassigned
Cosmic
Fix Released
Critical
Unassigned

Bug Description

[Impact]
If there is a network hiccup at the right moment it's possible that some sources.list entries will be disabled when a release upgrade is calculated and then people could upgrade with surprising results e.g. universe being missing.

[Test Case]
This is somewhat convoluted as we need to create the network error only when a specific line is is being tested by the dist-upgrader.

1) Use a system on xenial or bionic and ensure prompt is set appropriately (lts for xenial, normal for bionic)
2) Edit your /etc/apt/sources.list file so that universe is a separate line from main, restricted, and multiverse
3) Run do-release-upgrade
4) Cancel the release upgrade
5) cd to /tmp/ubuntu-release-upgrader-$tmpname
6) edit DistUpgradeController.py with the attached patch which will cause the url check for the universe line to fail
7) run 'sudo ./$release-upgrading-to'
8) wait until you receive the message regarding quantities of packages to install, upgrade, etc
9) look at /etc/apt/sources.list file and notice that the lines with universe are disabled

With the release-upgrader from -proposed you'll need to follow the same steps and you'll notice that the lines with universe are not disabled.

[Regression Potential]
Because we are checking each unique uri in sources.list only one time its possible that if the first check fails then the upgrade will fail to be calculated. That is better than upgrading and having components disabled though.

[Original Description]

I took a bionic system and stepped through bionic->cosmic->disco via do-release-upgrade.

Upon finishing I noticed that universe was "gone" and all packages from universe were removed from the system. Based on the files on my system, it looks like it happened during the bionic->cosmic upgrade. You'll see in the sources.list that cosmic-updates universe pocket is that but not cosmic universe.

ProblemType: BugDistroRelease: Ubuntu 19.04
Package: ubuntu-release-upgrader-core 1:19.04.13
ProcVersionSignature: Ubuntu 5.0.0-8.9-generic 5.0.1
Uname: Linux 5.0.0-8-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.10-0ubuntu23
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 2 16:04:34 2019
InstallationDate: Installed on 2018-07-24 (252 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180724)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bashSourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to disco on 2019-04-02 (0 days ago)
VarLogDistupgradeXorgFixuplog:
 INFO:root:/usr/bin/do-release-upgrade running
 INFO:root:No xorg.conf, exiting
mtime.conffile..etc.update-manager.release-upgrades: 2019-04-02T08:18:06.798258

Related branches

Revision history for this message
Dean Henrichsmeyer (dean) wrote :
Revision history for this message
Dean Henrichsmeyer (dean) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

The timestamp on /etc/apt/sources.list.distUpgrade wouldn't tell us anything useful since it will have been modified as part of the cosmic->disco upgrade; but the fact that it shows universe commented out with bionic in the series, not cosmic, confirms that this was already disabled by the time the bionic->cosmic dist-upgrade finished, otherwise u-r-u would've rewritten the lines as part of that upgrade to show cosmic rather than bionic.

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → Critical
Steve Langasek (vorlon)
summary: - universe missing after do-release-upgrade
+ universe missing after bionic->cosmic do-release-upgrade
Revision history for this message
Dean Henrichsmeyer (dean) wrote :
tags: added: cosmic2disco
tags: added: id-5ca3d1e6bc6a797ad8a39c67
Steve Langasek (vorlon)
tags: added: regression-update
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-release-upgrader (1:19.04.14) disco; urgency=medium

  * DistUpgradeController.py: Instead of checking every sources.list entry to
    see if they are accessible keep track of the uris and only test once per
    uri thereby preventing situations where entries for the same server are
    enabled and disabled. (LP: #1822886)
  * Update of demotions and mirrors data.

 -- Brian Murray <email address hidden> Thu, 04 Apr 2019 17:06:26 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
importance: Undecided → Critical
Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
importance: Undecided → Critical
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: New → Triaged
Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dean, or anyone else affected,

Accepted ubuntu-release-upgrader into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:18.10.11.6 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 and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. 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.

description: updated
Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dean, or anyone else affected,

Accepted ubuntu-release-upgrader into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:18.04.31 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

I followed the test when upgrading a system from xenial to bionic and it passed. Here we can see that url_downloadable is called only once with the version of the release upgrader in -proposed and that the universe entry is still enabled:

2019-04-15 09:53:30,259 INFO Using config files '['./DistUpgrade.cfg.xenial']'
2019-04-15 09:53:30,260 INFO uname information: 'Linux clean-xenial-amd64 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64'
2019-04-15 09:53:30,527 INFO apt version: '1.2.31'
2019-04-15 09:53:30,527 INFO python version: '3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609]'
2019-04-15 09:53:30,530 INFO release-upgrader version '18.04.31' started
...
2019-04-15 09:53:41,478 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu xenial main restricted multiverse'
2019-04-15 09:53:41,478 DEBUG verifySourcesListEntry: deb http://ubuntu.osuosl.org/ubuntu bionic main restricted multiverse
2019-04-15 09:53:41,478 DEBUG url_downloadable: http://ubuntu.osuosl.org/ubuntu/dists/bionic/Release
2019-04-15 09:53:41,478 DEBUG s='http' n='ubuntu.osuosl.org' p='/ubuntu/dists/bionic/Release' q='' f=''
2019-04-15 09:53:41,556 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu bionic main restricted multiverse' updated to new dist
2019-04-15 09:53:41,556 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu xenial-updates main restricted multiverse'
2019-04-15 09:53:41,557 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu bionic-updates main restricted multiverse' updated to new dist
2019-04-15 09:53:41,557 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu xenial-security main restricted multiverse'
2019-04-15 09:53:41,558 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu bionic-security main restricted multiverse' updated to new dist
2019-04-15 09:53:41,558 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu xenial universe'
2019-04-15 09:53:41,558 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu bionic universe' updated to new dist

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

I followed the steps in the test case when upgrading from bionic to cosmic and it passed. In the main.log file of the upgrade using 'do-release-upgrade -p' we can see url_downloadable is called only once and that the universe entry is still enabled.

2019-04-15 10:13:22,505 INFO Using config files '['./DistUpgrade.cfg']'
2019-04-15 10:13:22,505 INFO uname information: 'Linux clean-bionic-amd64 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 x86_64'
2019-04-15 10:13:22,517 INFO apt version: '1.6.10'
2019-04-15 10:13:22,517 INFO python version: '3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]'
2019-04-15 10:13:22,517 INFO release-upgrader version '18.10.11.6' started
...
2019-04-15 10:13:47,165 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu bionic main restricted multiverse'
2019-04-15 10:13:47,165 DEBUG verifySourcesListEntry: deb http://ubuntu.osuosl.org/ubuntu cosmic main restricted multiverse
2019-04-15 10:13:47,166 DEBUG url_downloadable: http://ubuntu.osuosl.org/ubuntu/dists/cosmic/Release
2019-04-15 10:13:47,166 DEBUG s='http' n='ubuntu.osuosl.org' p='/ubuntu/dists/cosmic/Release' q='' f=''
2019-04-15 10:13:47,330 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu cosmic main restricted multiverse' updated to new dist
2019-04-15 10:13:47,331 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu bionic-updates main restricted multiverse'
2019-04-15 10:13:47,331 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu cosmic-updates main restricted multiverse' updated to new dist
2019-04-15 10:13:47,331 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu bionic-security main restricted multiverse'
2019-04-15 10:13:47,332 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu cosmic-security main restricted multiverse' updated to new dist
2019-04-15 10:13:47,332 DEBUG examining: 'deb http://ubuntu.osuosl.org/ubuntu bionic universe'
2019-04-15 10:13:47,332 DEBUG entry 'deb http://ubuntu.osuosl.org/ubuntu cosmic universe' updated to new dist

Setting to verification-done for bionic and cosmic.

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

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

---------------
ubuntu-release-upgrader (1:18.10.11.6) cosmic; urgency=medium

  * DistUpgradeController.py: Instead of checking every sources.list entry to
    see if they are accessible keep track of the uris and only test once per
    uri thereby preventing situations where entries for the same server are
    enabled and disabled. (LP: #1822886)
  * debian/control: build depend on the new version of update-manager which
    supports checking to see if an https url is downloadable. (LP: #1823410)
  * tests/test_sources.list.py: add a test for https support.

 -- Brian Murray <email address hidden> Tue, 09 Apr 2019 17:10:21 -0700

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
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 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.

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

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

---------------
ubuntu-release-upgrader (1:18.04.31) bionic; urgency=medium

  * DistUpgradeController.py: Instead of checking every sources.list entry to
    see if they are accessible keep track of the uris and only test once per
    uri thereby preventing situations where entries for the same server are
    enabled and disabled. (LP: #1822886)
  * debian/control: build depend on the new version of update-manager which
    supports checking to see if an https url is downloadable. (LP: #1823410)
  * tests/test_sources.list.py: add a test for https support.

 -- Brian Murray <email address hidden> Tue, 09 Apr 2019 18:05:01 -0700

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
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.