traceback from postinst on upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned | ||
Impish |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Original bug description]
I noticed this on an upgrade in focal:
Setting up ubuntu-
Installing new version of config file /etc/ubuntu-
Traceback (most recent call last):
File "<string>", line 10, in <module>
KeyError: 'status'
Traceback (most recent call last):
File "<string>", line 10, in <module>
KeyError: 'status'
It's clearly nonfatal, but we shouldn't see python tracebacks in upgrade logs.
[Impact]
This releases will guarantee that unattached users installing ubuntu-
will no longer see the KeyError issue. Additionally, this will guarantee that the postinst flow where this error is triggered will be finished. However, this should not impact users that saw this bug, since the function was cleaning up old apt sources for esm-infra and esm-apps. However, since the user is unattached, that cleanup should have already happened if those service were once enabled.
[Test Case]
1.Launch an ubuntu machine:
$ lxc launch ubuntu-daily:xenial dev-x
2. SSH into the machine and update ubuntu-
3. Run ua status
4. Go into /var/lib/
change the ESM_SUPPORTED_ARCHS variable to be empty
5. Run dpkg-reconfigure ubuntu-
6. Confirm that the expected error is there
7. Install the new UA package 27.4.2
https:/
8. Go into /var/lib/
change the ESM_SUPPORTED_ARCHS variable to be empty
9. Run the dpkg command again and verify that no errors are shown
<TODO After released to -proposed: attach integration test artifacts>
[Regression Potential]
We currently don't see any regression potential, we are just making the code more resilient to potential errors on unattached scenarios.
[racb] We're adjusting the postinst, so if something goes wrong, it's likely to manifest in the console at package install or upgrade time.
[racb] Sometimes existing issues get exacerbated by issuing an update that causes the postinst to run again.
[Discussion]
Even though this will not affect all architecturse, we believe it is safer to address this as soon as possible, since we don't know when our next major release will be.
[Changelog]
* d/tools.postinst:
- Fix check_service_
unattached (LP: #1951705)
Related branches
- Canonical Server Core Reviewers: Pending requested
-
Diff: 39 lines (+17/-3)2 files modifieddebian/changelog (+14/-0)
debian/ubuntu-advantage-tools.postinst (+3/-3)
- Athos Ribeiro (community): Approve
- Canonical Server Core Reviewers: Pending requested
-
Diff: 33 lines (+11/-3)2 files modifieddebian/changelog (+8/-0)
debian/ubuntu-advantage-tools.postinst (+3/-3)
description: | updated |
summary: |
- traceback from postinst on upgrade + ubuntu-advantage-tools (27.4.1 -> 27.4.2) Xenial, Bionic, Focal, + Hirsute, Impish |
description: | updated |
description: | updated |
summary: |
- ubuntu-advantage-tools (27.4.1 -> 27.4.2) Xenial, Bionic, Focal, - Hirsute, Impish + traceback from postinst on upgrade |
Status changed to 'Confirmed' because the bug affects multiple users.