Open anarcat opened 3 months ago
I don't know if it's the right place, but could you also not include phasing updates ? Because right now the apt_info script will report pending update even when these packages are being deferred due to phasing.
For example when you want to upgrade with apt upgrade
command :
The following upgrades have been deferred due to phasing:
cloud-init python3-distupgrade ubuntu-release-upgrader-core
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
The apt_upgrades_pending
metric will stay a 3 in this case.
Phasing updates are used in Ubuntu.
not part of my use case, but sure, that would be nice.
how do you tell those apart? how does apt know those shouldn't be updated?
in this case, for example, could you show the output of apt-cache policy cloud-init
?
The script would need to test for this property of the packages returned by the cache: https://apt-team.pages.debian.net/python-apt/library/apt.package.html#apt.package.Package.phasing_applied
For example:
>>> cache = apt.cache.Cache()
>>> [p for p in cache if p.phasing_applied]
[<Package: name:'distro-info-data' architecture='amd64' id:1833>, <Package: name:'python3-distupgrade' architecture='amd64' id:10292>, <Package: name:'ubuntu-release-upgrader-core' architecture='amd64' id:10793>, <Package: name:'ubuntu-release-upgrader-qt' architecture='amd64' id:41862>]
nice!
also:
i plan on adding those into apt_info.py through a merge request unless someone objects in a coming weeks. please let me know.
i'm rather busy right now, so if someone else wants to work on this, go for it, just ping me here so i don't start duplicating work (and i'll do the same if i start working on it).
Hi,
We're migrating away from icinga here and we have an in-house check that provides us with quite useful metrics.
apt_info.py
has this:our
dsa-check-packages
has this:that is:
apt_upgrades_held
)apt_upgrades_pending
)apt upgrade
won't upgrade (see for example Ubuntu phased upgrades or pinned packages?)the "obsolete packages" is the most important, as those are packages that might not be covered by security upgrade and a manual configuration...
i plan on adding those into apt_info.py through a merge request unless someone objects in a coming weeks. please let me know.
This issue is tracked in https://gitlab.torproject.org/tpo/tpa/team/-/issues/41712 on our side.