Bug 37231

Summary: maintenance and release policy with reboot is broken
Product: UCS Reporter: Tim Petersen <petersen>
Component: Update - univention-updaterAssignee: Philipp Hahn <hahn>
Status: CLOSED FIXED QA Contact: Stefan Gohmann <gohmann>
Severity: normal    
Priority: P5 CC: gohmann, grandjean, hahn, walkenhorst
Version: UCS 4.0   
Target Milestone: UCS 4.0-0-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- 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):
Max CVSS v3 score:
Bug Depends on:    
Bug Blocks: 37298    

Description Tim Petersen univentionstaff 2014-12-08 12:13:45 CET
If using a release policy with maintenance policy and activated reboot-now switch, the system reboots WHILE actualising!

What happens is:

1. univention-updater net <versiontag> --reboot=now
2. univention-actualise --dist-upgrade --silent


-->
root /usr/sbin/jitter 600 /usr/share/univention-updater/univention-updater net --updateto=3.2-4 --reboot=now --silent --noninteractive; /usr/share/univention-updater/univention-actualise --dist-upgrade --silent
Comment 1 Tim Petersen univentionstaff 2014-12-08 12:13:57 CET
Already broken in 3.2
Comment 2 Tim Petersen univentionstaff 2014-12-08 12:21:36 CET
2014120821000095
Comment 3 Stefan Gohmann univentionstaff 2014-12-08 15:16:10 CET
(In reply to Tim Petersen from comment #1)
> Already broken in 3.2

Please make also a backport to UCS 3.2.
Comment 4 Philipp Hahn univentionstaff 2014-12-10 15:59:25 CET
*** Bug 19749 has been marked as a duplicate of this bug. ***
Comment 5 Philipp Hahn univentionstaff 2014-12-10 16:02:52 CET
If reboot is used with a fixed time and the job runs more than once per day, multiple at-jobs are created to reboot:
# atq
2       Thu Dec 11 00:15:00 2014 a root
3       Thu Dec 11 00:15:00 2014 a root
6       Thu Dec 11 00:15:00 2014 a root
5       Thu Dec 11 00:15:00 2014 a root
4       Thu Dec 11 00:15:00 2014 a root

# at -c 2
#!/bin/sh
# atrun uid=0 gid=0
# mail root 0
umask 22
HOME=/root; export HOME
LOGNAME=root; export LOGNAME
PATH=/sbin:/usr/sbin:/usr/bin:/bin; export PATH
PWD=/root; export PWD
cd /root || {
         echo 'Execution directory inaccessible' >&2
         exit 1
}
/sbin/reboot
Comment 6 Philipp Hahn univentionstaff 2014-12-11 08:48:21 CET
r56679 | Bug #37231 Update: Reboot only after all updates
 Move reboot logic from univention-updater to univention-maintenance

Package: univention-updater
Version: 10.0.51-8.1351.201412110837
Branch: ucs_4.0-0
Scope: errata4.0-0

r56683 | Bug #37231 Update: Reboot only after all updates YAML
 2014-12-01-univention-updater.yaml
Comment 7 Stefan Gohmann univentionstaff 2015-01-27 07:54:41 CET
YAML: OK

Tests: OK

Code review: OK
Comment 8 Janek Walkenhorst univentionstaff 2015-01-29 11:47:42 CET
<http://errata.univention.de/ucs/4.0/53.html>