upgrade_lts_contract.py exception on impish and later

Bug #1968067 reported by Grant Orndorff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Fix Released
High
Lucas Albuquerque Medeiros de Moura
Impish
Fix Released
High
Lucas Albuquerque Medeiros de Moura
Jammy
Fix Released
High
Lucas Albuquerque Medeiros de Moura

Bug Description

[Impact]
When users are upgrading their machines, we run the upgrade_lts_contract script to ensure that the services that were enabled will keep being enabled in the new ubuntu release the users are upgraded to.

Currently, if the user upgrades directly from Focal to Jammy, the script will error out because we are missing the entries for Focal and Impish on that script.

Therefore, even though we might not have full support for some services in Jammy yet, we should not error out on that script and allow it to complete;

[Test Case]
To reproduce the bug: follow these steps:

1. Launch a jammy machine
2. Attach to a valid UA token
3. run `sudo python3 /usr/lib/ubuntu-advantage/upgrade_lts_contract.py`

And to verify that the fix works:

1. Upgrade UA to version 27.8
2. re-run `sudo python3 /usr/lib/ubuntu-advantage/upgrade_lts_contract.py` and confirm no errors are raised

[Regression Potential]
We are just adding the new releases into our support dict and providing better error messages if that problem happens again in the future. Therefore, we don't believe we have a big regression issue here.

[Original Description]

See this error https://errors.ubuntu.com/problem/864d1a4d38167a7b009ce993125030b58eb012d5

When upgrading from focal -> impish or from impish -> jammy, a KeyError will occur in the upgrade_lts_contract.py script from ubuntu-advantage-tools. This happens because that script has not been kept up-to-date with new ubuntu series names since groovy.

We plan to fix this bug in our next release of ubuntu-advantage-tools, which will be version 27.8 and should occur within the next month.

Changed in ubuntu-advantage-tools (Ubuntu Impish):
importance: Undecided → High
Changed in ubuntu-advantage-tools (Ubuntu Jammy):
importance: Undecided → High
Changed in ubuntu-advantage-tools (Ubuntu Impish):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Jammy):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Impish):
assignee: nobody → Lucas Albuquerque Medeiros de Moura (lamoura)
Changed in ubuntu-advantage-tools (Ubuntu Jammy):
assignee: nobody → Lucas Albuquerque Medeiros de Moura (lamoura)
Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :
description: updated
Steve Langasek (vorlon)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Grant, or anyone else affected,

Accepted ubuntu-advantage-tools into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.8~22.04.1 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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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-advantage-tools (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

I have tested the package in -proposed using the steps in the description. I first verified the bug occurred on jammy with the current package and that it no longer occurred after upgrading to the package in -proposed. Please see the attached log.

Marking verification-done-jammy

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

This bug was fixed in the package ubuntu-advantage-tools - 27.8~22.04.1

---------------
ubuntu-advantage-tools (27.8~22.04.1) jammy; urgency=medium

  * New upstream release 27.8 (LP: #1969125)
    - entitlements: apply overrides from the contract response
    - fips:
      + unhold fips packages when enabling fips-updates
      + Automatically disable fips service before enabling fips-updates
      + unhold more packages when enabling fips
    - lib: fix upgrade script for unsupported releases (LP: #1968067)
    - realtime: add support for realtime kernel beta service on Jammy

ubuntu-advantage-tools (27.7.1~22.04.1) jammy; urgency=medium

  * fips:
    - make fips service incompatible with fips-updates
    - unhold more packages when enabling fips

 -- Lucas Moura <email address hidden> Wed, 13 Apr 2022 18:17:02 -0300

Changed in ubuntu-advantage-tools (Ubuntu Jammy):
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-advantage-tools 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
Grant Orndorff (orndorffgrant) wrote :

It doesn't look like this bug was captured by the normal automation for the impish SRU of ubuntu-advantage-tools 27.8, but I have performed the verification and the fix works as expected. Please see the attached log.

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

This bug was fixed in the package ubuntu-advantage-tools - 27.8~21.10.1

---------------
ubuntu-advantage-tools (27.8~21.10.1) impish; urgency=medium

  * Backport new upstream release: (LP: #1969125) to impish

 -- Lucas Moura <email address hidden> Thu, 14 Apr 2022 15:32:46 -0300

Changed in ubuntu-advantage-tools (Ubuntu Impish):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers