Bug 55581 - Missing reboot-file after kernel update
Missing reboot-file after kernel update
Status: RESOLVED INVALID
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-01-19 08:57 CET by Mirac Erdemiroglu
Modified: 2023-01-19 10:06 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few 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.046
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023011821000436
Bug group (optional): Regression
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirac Erdemiroglu univentionstaff 2023-01-19 08:57:06 CET
UCS 5.0-2 errata 541

Debian would need to create a /var/run/reboot-required file when installing/updating a kernel.
With errata 5.0.2-541 the kernel 4.19.0-23 came, but due to lack of semaphore file our Ansible job did not reboot the machines.
Comment 1 Philipp Hahn univentionstaff 2023-01-19 10:06:22 CET
Creating [/var]/run/reboot-required was and is not part of any standard Linux kernel; it only happens when Debian package "unattended-upgrades" is installed, which UCS does not install by default. It was maintained in UCS-4 but no longer is in UCS-5; see /usr/share/univention-errata-level/maintained-packages.txt

Ansible is also unmaintained and not supported officially by UCS (core developers).

If you require such functionality deploy something like the following script yourself:

± cat /etc/kernel/postinst.d/unattended-upgrades 
#!/bin/sh
case "$DPKG_MAINTSCRIPT_PACKAGE::$DPKG_MAINTSCRIPT_NAME" in
   linux-image-extra*::postrm)
      exit 0;;
esac
if [ -d /var/run ]; then
    touch /var/run/reboot-required
    if ! grep -q "^$DPKG_MAINTSCRIPT_PACKAGE$" /var/run/reboot-required.pkgs 2> /dev/null ; then
        echo "$DPKG_MAINTSCRIPT_PACKAGE" >> /var/run/reboot-required.pkgs
    fi
fi