Flag hosts without room on disk for their pending upgrades
CI / tests (Python 3.10) (pull_request) Successful in 43s
CI / tests (Python 3.11) (pull_request) Successful in 44s
CI / tests (Python 3.12) (pull_request) Successful in 43s
CI / tests (Python 3.13) (pull_request) Successful in 42s
CI / lint (pull_request) Successful in 3s
CI / tests (Python 3.10) (pull_request) Successful in 43s
CI / tests (Python 3.11) (pull_request) Successful in 44s
CI / tests (Python 3.12) (pull_request) Successful in 43s
CI / tests (Python 3.13) (pull_request) Successful in 42s
CI / lint (pull_request) Successful in 3s
A filesystem that fills up while apt downloads or dpkg unpacks leaves the upgrade half-done and apt broken, the same failure as a full /boot but on / or /var. Nothing caught it until the host's updates stopped. The agent (0.11.0) now works out what the pending upgrades need. A simulation doesn't print apt's "Need to get" or "additional disk space" lines, so it sums the package records from apt-cache show for each version the simulation would install: Size for each .deb not already in /var/cache/apt/archives, and the growth in Installed-Size over the installed versions (from dpkg-query). Removals aren't subtracted, so it errs high. It also reports free space and the mount point of the filesystems holding /var/cache/apt/archives and /usr. The server puts a host in update when the upgrades would leave less than upgrade_min_free_mb (default 100, 0 disables) on either filesystem. The download and the install both count when they're on the same one. With nothing pending there is nothing to check, so this doesn't turn into general disk monitoring. The host page gets a "Pending upgrades size" row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5be19f85d
commit
15b1f5be4f
13 files changed
+363
-7
No files matched your search
@@ -47,6 +47,12 @@ FIELDS: dict[str, str] = {
|
||||
"apt_simulation_error": "str",
|
||||
"boot_size_kb": "int",
|
||||
"boot_free_kb": "int",
|
||||
"upgrade_download_kb": "int",
|
||||
"upgrade_install_kb": "int",
|
||||
"apt_archives_free_kb": "int",
|
||||
"apt_archives_mount": "str",
|
||||
"usr_free_kb": "int",
|
||||
"usr_mount": "str",
|
||||
"dpkg_unfinished_packages": "strlist",
|
||||
"held_packages": "strlist",
|
||||
"ubuntu_pro_attached": "bool",
|
||||
|
||||
Reference in new issue
Block a user