Bug 58386 - preup.sh check `disk_space` unnecessarily fails even with update52/pruneoldkernel=yes
Summary: preup.sh check `disk_space` unnecessarily fails even with update52/pruneoldke...
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Update - Release updates
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.2-2-errata
Assignee: Iván.Delgado
QA Contact: Arvid Requate
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-12 15:40 CEST by Arvid Requate
Modified: 2025-07-23 15:53 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2025-06-12 15:40:12 CEST
In the update tests to 5.2-2 I had the situation that the preup.sh check
`disk_space`  failed and I followed the advice and set the UCR variable
`update52/pruneoldkernel` to `true`. But then, since the kernel pruning
appears to be done in the `kernel` check and the `disk_space` check runs first,
it still fails, then prunes the kernels and finally it unnecessarily stops the update. It's not a show-stopper, but just annoying, because it could just continue if we switch the order of the checks.

```
Checking disk_space ...                           FAIL
Checking failed_ldif ...                          OK
Checking hold_packages ...                        OK
Checking kernel ...                               OK
Checking ldap_connection ...                      OK
Checking ldap_schema ...                          OK
Checking master_version ...                       OK
Checking minimum_ucs_version_of_all_systems_in_domain ... OK
Checking overwritten_umc_templates ...            OK
Checking package_status ...                       OK
Checking role_package_removed ...                 OK
Checking slapd_on_member ...                      OK
Checking ssh ...                                  OK
Checking system_date_too_old ...                  OK
Checking term ...                                 OK
Checking ucsschool ...                            OK
Checking valid_machine_credentials ...            OK

The system can not be updated to UCS 5.2 due to the following reasons:

disk_space:
        Not enough space in /boot, need at least 200 MB.
        This may interrupt the update and result in an inconsistent system!

        Old kernel versions on /boot/ can be pruned by manully by running
        'univention-prune-kernels' or automatically during
        next update attempt by setting config registry variable
        update52/pruneoldkernel to "yes".

        This check can be disabled by setting the UCR variable 'update52/ignore_free_space' to 'yes'.
        But be aware that this is not recommended!
```
Comment 2 Arvid Requate univentionstaff 2025-07-22 17:14:31 CEST
d08d1dd2679 | fix(univention-updater): run prune kernels before check which run the disk space check
5e1202be389 | fix(univention-updater): advisory + changelog

Package: univention-updater
Version: 17.2.8
Release: 5.2-0
Scope: errata5.2-2
Comment 3 Arvid Requate univentionstaff 2025-07-22 17:29:30 CEST
The preup.sh change also has been merged into the backport branches:

34af696c570 | fix(univention-updater): run prune kernels before check which run the disk space check (5.1-0)
4ec39bdbc9a | fix(univention-updater): run prune kernels before check which run the disk space check (5.2-0)
ee9ba47d269 | fix(univention-updater): run prune kernels before check which run the disk space check (5.2-1)

Test update from UCS 5.2-1 to 5.2-0 successful:
* with update52/pruneoldkernel=yes (which now runs first)
* without update52/pruneoldkernel