KernelRemoval section is out of date

Bug #1828072 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Bionic
Fix Released
Undecided
Brian Murray
Cosmic
Fix Released
Undecided
Brian Murray
Disco
Fix Released
High
Brian Murray

Bug Description

The dist-upgrader tarball includes configuration files for the release upgrade process and part of the configuration file is a section with the heading KernelRemoval which includes Version, BaseNames, and Types which are used to build a list of kernels to remove. This section has not been updated in quite some time and we should up date so systems have less old kernels installed.

[Test Case]
1) upgrade a system from a release of Ubuntu to a new release of Ubuntu (this should be done for the following paths B->C, C->D, B->D)
2) observe the following in /var/log/dist-upgrade/main.log
"2019-05-07 11:38:23,264 DEBUG identifyObsoleteKernels()
2019-05-07 11:38:27,621 DEBUG identifyObsoleteKernels found 'set()'"

The release upgrader from -proposed (do-release-upgrader -p) should identify some obsolete kernels ("skipping running kernel linux-headers-5.0.0-13-generic") even if it doesn't end up removing them.

[Regression Potential]
I made the BaseNames section split out across multiple lines which should be fine but that could cause the config file to fail to be parsed which would probably cause a crash or the same failure to remove obsolete kernels.

Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
Changed in ubuntu-release-upgrader (Ubuntu Disco):
assignee: nobody → Brian Murray (brian-murray)
status: New → In Progress
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu Disco):
importance: Undecided → High
description: updated
description: updated
Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
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.10.3

---------------
ubuntu-release-upgrader (1:19.10.3) eoan; urgency=medium

  * data/DistUpgrade.cfg: update BaseNames section to kernel packages that
    appear in Ubuntu 19.04. (LP: #1828072)
  * data/DistUpgrade.cfg.bionic: update KernelRemoval section to kernel
    packages that appear in Ubuntu 18.04. (LP: #1828072)

 -- Brian Murray <email address hidden> Tue, 07 May 2019 10:15:37 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
tags: added: id-5cd1c553aa795783cf92dbfd
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Brian, or anyone else affected,

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

Hello Brian, 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.7 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.

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Brian, 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.32 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.

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

I tested this when upgrading from xenial to bionic and this worked well.

root@clean-xenial-amd64:/tmp/ubuntu-release-upgrader-qc5mefel# head -n10 /var/log/dist-upgrade/main.log
2019-05-09 13:31:56,719 INFO Using config files '['./DistUpgrade.cfg.xenial']'
2019-05-09 13:31:56,719 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-05-09 13:31:56,995 INFO apt version: '1.2.31'
2019-05-09 13:31:56,996 INFO python version: '3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609]'
2019-05-09 13:31:56,998 INFO release-upgrader version '18.04.32' started
2019-05-09 13:31:57,001 INFO locale: 'en_US' 'UTF-8'
2019-05-09 13:31:57,100 DEBUG Using 'DistUpgradeViewText' view
2019-05-09 13:31:57,136 DEBUG enable dpkg --force-overwrite
2019-05-09 13:31:57,154 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
root@clean-xenial-amd64:/tmp/ubuntu-release-upgrader-qc5mefel# grep -i obsoletekernel /var/log/dist-upgrade/main.log
2019-05-09 14:09:58,075 DEBUG identifyObsoleteKernels()
2019-05-09 14:10:03,979 DEBUG identifyObsoleteKernels found '{'linux-image-4.4.0-98-generic', 'linux-signed-image-4.4.0-98-generic'}'

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested this when upgrading from bionic to cosmic and it also passed the test.

root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-z0ltcdq5# head -n10 /var/log/dist-upgrade/main.log
2019-05-09 14:51:06,729 INFO Using config files '['./DistUpgrade.cfg']'
2019-05-09 14:51:06,729 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-05-09 14:51:07,065 INFO apt version: '1.6.10'
2019-05-09 14:51:07,066 INFO python version: '3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]'
2019-05-09 14:51:07,069 INFO release-upgrader version '18.10.11.7' started
2019-05-09 14:51:07,079 INFO locale: 'en_US' 'UTF-8'
2019-05-09 14:51:07,150 DEBUG setting up environ for non-interactive use
2019-05-09 14:51:07,266 DEBUG Using 'DistUpgradeViewNonInteractive' view
2019-05-09 14:51:07,301 DEBUG enable dpkg --force-overwrite
root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-z0ltcdq5# grep -i "obsoletekernel" /var/log/dist-upgrade/main.log
2019-05-09 15:04:52,807 DEBUG identifyObsoleteKernels()
2019-05-09 15:04:58,059 DEBUG identifyObsoleteKernels found '{'linux-modules-extra-4.15.0-45-generic', 'linux-image-4.15.0-48-generic', 'linux-headers-4.15.0-46-generic', 'linux-headers-4.15.0-45-generic', 'linux-modules-4.15.0-46-generic', 'linux-modules-4.15.0-48-generic', 'linux-modules-extra-4.15.0-46-generic', 'linux-modules-extra-4.15.0-48-generic', 'linux-modules-4.15.0-45-generic', 'linux-image-4.15.0-45-generic', 'linux-headers-4.15.0-48-generic', 'linux-image-4.15.0-46-generic'}'

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested this with an upgrade from cosmic to disco and it too passed.

root@clean-cosmic-amd64:/tmp/ubuntu-release-upgrader-6d11obk0# head -n10 /var/log/dist-upgrade/main.log
2019-05-09 15:22:33,860 INFO Using config files '['./DistUpgrade.cfg']'
2019-05-09 15:22:33,860 INFO uname information: 'Linux clean-cosmic-amd64 4.18.0-18-generic #19-Ubuntu SMP Tue Apr 2 18:13:16 UTC 2019 x86_64'
2019-05-09 15:22:34,195 INFO apt version: '1.7.4'
2019-05-09 15:22:34,195 INFO python version: '3.6.8 (default, Apr 9 2019, 04:59:38)
[GCC 8.3.0]'
2019-05-09 15:22:34,198 INFO release-upgrader version '19.04.16.4' started
2019-05-09 15:22:34,207 INFO locale: 'en_US' 'UTF-8'
2019-05-09 15:22:34,273 DEBUG setting up environ for non-interactive use
2019-05-09 15:22:34,314 DEBUG Using 'DistUpgradeViewNonInteractive' view
2019-05-09 15:22:34,346 DEBUG enable dpkg --force-overwrite
root@clean-cosmic-amd64:/tmp/ubuntu-release-upgrader-6d11obk0# grep -i obsoletekernel /var/log/dist-upgrade/main.log
2019-05-09 15:37:48,149 DEBUG identifyObsoleteKernels()
2019-05-09 15:37:52,532 DEBUG identifyObsoleteKernels found '{'linux-modules-extra-4.18.0-10-generic', 'linux-modules-4.18.0-10-generic', 'linux-image-unsigned-4.18.0-10-generic', 'linux-headers-4.18.0-10-generic'}'

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

And an upgrade from Bionic to Disco also passed:

root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-bctl6u37# head -n10 /var/log/dist-upgrade/main.log
2019-05-09 16:02:07,695 INFO Using config files '['./DistUpgrade.cfg.bionic']'
2019-05-09 16:02:07,695 INFO uname information: 'Linux clean-bionic-amd64 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64'
2019-05-09 16:02:08,038 INFO apt version: '1.6.10'
2019-05-09 16:02:08,038 INFO python version: '3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]'
2019-05-09 16:02:08,040 INFO release-upgrader version '19.04.16.4' started
2019-05-09 16:02:08,047 INFO locale: 'en_US' 'UTF-8'
2019-05-09 16:02:08,116 DEBUG setting up environ for non-interactive use
2019-05-09 16:02:08,158 DEBUG Using 'DistUpgradeViewNonInteractive' view
2019-05-09 16:02:08,194 DEBUG enable dpkg --force-overwrite
root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-bctl6u37# grep -i obsoletekernels /var/log/dist-upgrade/main.log
2019-05-09 16:19:00,748 DEBUG identifyObsoleteKernels()
2019-05-09 16:19:05,646 DEBUG identifyObsoleteKernels found '{'linux-headers-4.15.0-46-generic', 'linux-image-4.15.0-45-generic', 'linux-modules-4.15.0-45-generic', 'linux-image-4.15.0-46-generic', 'linux-modules-extra-4.15.0-45-generic', 'linux-headers-4.15.0-45-generic', 'linux-modules-extra-4.15.0-47-generic', 'linux-modules-4.15.0-46-generic', 'linux-modules-extra-4.15.0-46-generic', 'linux-image-4.15.0-47-generic', 'linux-modules-4.15.0-47-generic', 'linux-headers-4.15.0-47-generic'}'

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

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

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

  * DistUpgrade/DistUpgradeQuirks.py: modify function which updates snaps so
    that it determines the release from which a system is being upgraded.
    Additionally, update the channel for the snap to reflect the release to
    which we are upgrading. (LP: #1827951)
  * data/DistUpgrade.cfg.bionic, data/DistUpgrade.cfg:
    - update KernelRemoval sections to kernel packages that appear in
      Ubuntu 18.04 and Ubuntu 18.10. (LP: #1828072)

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

  * data/DistUpgrade.cfg.bionic,
    data/demoted.cfg.bionic,
    pre-build.sh:
    - support upgrades from bionic (LP: #1827635)

 -- Brian Murray <email address hidden> Mon, 06 May 2019 16:20:45 -0700

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

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

  * data/DistUpgrade.cfg: update KernelRemoval sections to kernel packages
    that appear in Ubuntu 18.04. (LP: #1828072)

 -- Brian Murray <email address hidden> Tue, 07 May 2019 13:48:48 -0700

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * data/DistUpgrade.cfg.xenial: update KernelRemoval sections to kernel
    packages that appear in Ubuntu 16.04. (LP: #1828072)

 -- Brian Murray <email address hidden> Tue, 07 May 2019 15:44:49 -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.