error in checking : pro security-status --esm-apps
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-advantage-tools (Ubuntu) |
Fix Released
|
Medium
|
Renan Rodrigo | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Medium
|
Renan Rodrigo |
Bug Description
[Impact]
Systems which hold installed packages without any remote origin or any candidate see an error when running pro security-status (also using any flag).
Those packages should instead be considered unknown (unavailable) - as there is no external reference to identify where does the package come from.
The code today only checks if the candidate is equal to the installed version, but ignores a corner case where the package has a negative pin, to avoid being updated/reinstalled for some reason (which makes little sense as there is no repository to fetch from , but still may happen).
[Test Case]
A script to test this change is attached to the bug, with a preferences file pinning some packages. Once the fix lands in -proposed, this script can be executed and verified. It consists in installing universe, third party and unavailable packages and checking that all works well. Then, pinning those packages to a negative value breaks pro security-status. The update fixes it and guarantees the packages are still classified correctly.
[Regression Potential]
Really very very unlinkely. The test scenario shows that for the specific case the change covers, the behavior is the same as if the packages had candidates (or, were not pinned). There is no sign of possible regression given the investigation + test case.
[Discussion]
The test scenario shows the fix is correct for all kinds of packages (ubuntu, third-party, unavailable/
[Original description]
root@plesk:~# pro security-status --esm-apps
Unexpected error(s) occurred.
For more details, see the log: /var/log/
To file a bug run: ubuntu-bug ubuntu-
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.4.0-137-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Sun Feb 5 13:10:20 2023
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: ubuntu-
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-id.txt: configdrive
Related branches
- Sergio Durigan Junior (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 1426 lines (+827/-88)32 files modifiedapt-hook/json-hook.cc (+11/-6)
apt-hook/json-hook.hh (+2/-0)
debian/changelog (+26/-0)
debian/ubuntu-advantage-tools.postinst (+20/-2)
docs/explanations/apt_messages.md (+2/-2)
features/apt_messages.feature (+26/-1)
features/attached_status.feature (+22/-1)
features/motd_messages.feature (+27/-4)
features/security_status.feature (+2/-1)
features/steps/network.py (+1/-15)
features/ubuntu_pro.feature (+0/-3)
features/unattached_commands.feature (+1/-1)
lib/esm_cache.py (+7/-1)
lib/timer.py (+14/-1)
sru/release-27.13.3/test-conffile-temp-fix.sh (+222/-0)
sru/release-27.13.4/test-no-esm-apps-duplicates-attached.sh (+103/-0)
sru/release-27.13.4/test-no-esm-apps-duplicates.sh (+109/-0)
uaclient/apt_news.py (+6/-4)
uaclient/exceptions.py (+14/-0)
uaclient/files/files.py (+10/-6)
uaclient/jobs/update_messaging.py (+14/-4)
uaclient/messages.py (+14/-0)
uaclient/security.py (+9/-6)
uaclient/security_status.py (+1/-1)
uaclient/status.py (+3/-1)
uaclient/system.py (+24/-17)
uaclient/tests/test_esm_cache.py (+25/-1)
uaclient/tests/test_security.py (+2/-2)
uaclient/tests/test_security_status.py (+13/-0)
uaclient/tests/test_system.py (+55/-7)
uaclient/tests/test_ua_timer.py (+41/-0)
uaclient/version.py (+1/-1)
information type: | Private → Public |
Changed in ubuntu-advantage-tools (Ubuntu): | |
assignee: | nobody → Renan Rodrigo (renanrodrigo) |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | removed: need-amd64-retrace |
Changed in ubuntu-advantage-tools (Ubuntu): | |
status: | Triaged → In Progress |
description: | updated |
This is the test script to verify the fix for this bug.
Once the package hits -proposed, this will be executed and the results posted.