Bug 48349 - update/reboot/required is no longer set if debian kernel is updated
update/reboot/required is no longer set if debian kernel is updated
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-3-errata
Assigned To: Philipp Hahn
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-14 13:55 CET by Sönke Schwardt-Krummrich
Modified: 2019-01-09 13:27 CET (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.137
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2018-12-14 13:55:24 CET
The UCR variable update/reboot/required is no longer set to true if debian kernel is updated. Therefore the UMC does not show that rebooting is advisable.
Comment 1 Arvid Requate univentionstaff 2018-12-18 14:41:14 CET
Any evidence for this claim? E.g. updater.log?
Comment 2 Philipp Hahn univentionstaff 2018-12-18 14:44:32 CET
The Debian kernel will never touch any UCR variables as they are UCS specific. It is done by

kernel/univention-kernel-image/debian/univention-kernel-image.postinst:35:
> univention-config-registry set update/reboot/required=true

Please provide "/var/log/univention/config-registry.replog".
Comment 3 Markus Dählmann 2018-12-18 15:16:44 CET
Some more information: When I upgrade from 4.3 errata-270 to errata-376, a newer kernel gets installed (4.9.110-3+deb9u5 -> 4.9.130-2), but it still has the same file name as the old one below /boot:

Before UCS Upgrade:

root@dc003:~# ls -l /boot/vmlinuz*
-rw-r--r-- 1 root root 4224800 Mai  8  2018 /boot/vmlinuz-4.9.0-6-amd64
-rw-r--r-- 1 root root 4237088 Sep 30 18:37 /boot/vmlinuz-4.9.0-8-amd64
-rw-r--r-- 1 root root 4241008 Okt  2 10:21 /boot/vmlinuz-4.9.0-8-amd64.efi.signed

After UCS Upgrade:

root@dc003:~# ls -l /boot/vmlinuz*
-rw-r--r-- 1 root root 4224800 Mai  8  2018 /boot/vmlinuz-4.9.0-6-amd64
-rw-r--r-- 1 root root 4232992 Okt 27 20:46 /boot/vmlinuz-4.9.0-8-amd64
-rw-r--r-- 1 root root 4236912 Nov 19 13:21 /boot/vmlinuz-4.9.0-8-amd64.efi.signed

So maybe the mechanism that checks for a newly installed kernel and sets the UCR variable falsely assumes by the file names, that no new kernel was installed after all.
Comment 4 Markus Dählmann 2018-12-18 15:43:03 CET
It looks like since the new kernel has the same package name as the old one (linux-image-4.9.0-8-amd64), no new version of univention-kernel-image with updated dependencies was shipped alongside it (at least I don't see a new one on my machines and in the errata repository). And without a new univention-kernel-image, the univention-kernel-image.postinst is not executed again.
Comment 5 Arvid Requate univentionstaff 2018-12-18 20:57:28 CET
Ok, thanks for the info, we'll check it.
Comment 6 Philipp Hahn univentionstaff 2018-12-21 11:21:15 CET
[4.3-3] f048db8e94 Bug #48349 kernel: Update UCRV update/reboot/required
 doc/errata/staging/univention-kernel-image.yaml               | 11 +++++++++++
 kernel/univention-kernel-image/debian/changelog               |  6 ++++++
 .../debian/univention-kernel-image.install                    |  1 +
 .../univention-kernel-image.postinst => ucs-reboot-required}  |  7 ++-----
 4 files changed, 20 insertions(+), 5 deletions(-)

[4.3-3] 453a2bec76 Bug #48349 kernel: Always Update UCRV update/reboot/required"
 doc/errata/staging/univention-kernel-image.yaml    |  2 +-
 kernel/univention-kernel-image/debian/changelog    |  6 ++
 kernel/univention-kernel-image/debian/rules        |  6 ++
 .../debian/univention-kernel-image.postinst.in     | 65 ++++++++++++++++++++++
 4 files changed, 78 insertions(+), 1 deletion(-)

Package: univention-kernel-image
Version: 11.0.1-11A~4.3.0.201812211117
Branch: ucs_4.3-0
Scope: errata4.3-3

[4.3-3] 256a8bb36e Bug #48349: univention-kernel-image 11.0.1-10A~4.3.0.201812201606
 doc/errata/staging/univention-kernel-image.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[4.3-3] 2ca286c566 Bug #48349: univention-kernel-image 11.0.1-11A~4.3.0.201812211117
 doc/errata/staging/univention-kernel-image.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

4QA: There is some gotcha: "univention-kernel-image" is the package pulling in "linux-image" as a dependency; as such "u-k-i" gets configured only *after* "l-i"; as the hook is a conffile below /etc/kernel/postinst.d/, it only gets installed when 'u-k-i' is configured. At that time "l-i" is already configured and is *not* invoked. Therefore the .postinst is still needed.
The logic is a little bit tricky as we do not want to set update/reboot/required needlessly: If the 4.9-0-8 kernel was already installed and rebootet and this time only u-k-i is updated, there is no need for another reboot.
Comment 7 Arvid Requate univentionstaff 2019-01-02 19:13:07 CET
Ok.
Comment 8 Arvid Requate univentionstaff 2019-01-09 13:27:11 CET
<http://errata.software-univention.de/ucs/4.3/395.html>