Bug 33189 - univention-maintenance cron job ignores release policy
univention-maintenance cron job ignores release policy
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2-0-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 12:27 CET by Stefan Gohmann
Modified: 2014-02-12 10:26 CET (History)
1 user (show)

See Also:
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:
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 Stefan Gohmann univentionstaff 2013-11-07 12:27:41 CET
The univention-maintenance / univention-updater cron job ignores the release activate policy:

root@member195:~# eval $(ucr shell)
root@member195:~# univention_policy_result -s -D "$ldap_hostdn" -y /etc/machine.secret "$ldap_hostdn"
univentionDesktopProfile="/usr/share/univention-kde-profiles/kde4-menu"
univentionDesktopProfile="/usr/share/univention-kde-profiles/ucs-3.0"
univentionAdminMayOverrideSettings="0"
univentionAdminListWebModules="modself"
univentionAdminListWizards="None"
univentionPWLength="8"
univentionPWHistoryLen="3"
univentionDhcpRouters="10.201.0.1"
univentionDhcpDomainName="deadlock19.local"
univentionDhcpDomainNameServers="10.201.19.1"
univentionMemberPackages="alien"
univentionCron="5 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 1,2,3,4,5,6,7,8,9,10,11,12 1,2,3,4,5,6,7 "
univentionCronActive="1"
univentionInstallationShutdown="0"
univentionInstallationStartup="0"

####### → univentionUpdateActivate is not set

root@member195:~# cat /etc/cron.d/univention-maintenance 
# cron job for update
PATH=/sbin:/usr/sbin:/usr/bin:/bin
5 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 1,2,3,4,5,6,7,8,9,10,11,12 1,2,3,4,5,6,7  root /usr/sbin/jitter 600 /usr/share/univention-updater/univention-updater net   --silent; /usr/sbin/jitter 600 /usr/share/univention-updater/univention-actualise --dist-upgrade --silent


####### Even after adding a new policy and disabling the upgrade

root@member195:~# univention_policy_result -s -D "$ldap_hostdn" -y /etc/machine.secret "$ldap_hostdn" | grep Act
univentionCronActive="1"
univentionUpdateActivate="FALSE"
root@member195:~# /etc/init.d/univention-directory-policy start
Starting Univention Directory Policy:.
root@member195:~# cat /etc/cron.d/univention-maintenance 
# cron job for update
PATH=/sbin:/usr/sbin:/usr/bin:/bin
5 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 1,2,3,4,5,6,7,8,9,10,11,12 1,2,3,4,5,6,7  root /usr/sbin/jitter 600 /usr/share/univention-updater/univention-updater net   --silent; /usr/sbin/jitter 600 /usr/share/univention-updater/univention-actualise --dist-upgrade --silent
root@member195:~# 


The upgrade is blocked by the preup.sh questions.
Comment 1 Philipp Hahn univentionstaff 2014-02-04 22:32:08 CET
r47634 | Bug #33189: Updater: Fix evaluation of univentionUpdateActive
univention-updater_9.0.38-10.1245.201402042222
r47637 | Bug #33189,33194: Updater release policy
Comment 2 Stefan Gohmann univentionstaff 2014-02-10 21:13:10 CET
(In reply to Philipp Hahn from comment #1)
> r47634 | Bug #33189: Updater: Fix evaluation of univentionUpdateActive
> univention-updater_9.0.38-10.1245.201402042222
> r47637 | Bug #33189,33194: Updater release policy

Code: OK
Tests: Failed:

+       elif 'univentionUpdateActive' == key:
+           try_release_update = value == "TRUE"

I think it must be univentionUpdateActivate and the value is set to '"TRUE"'.

YAML: Fail:
 s/updading/updating/
 s/erratum update/update/
Comment 3 Philipp Hahn univentionstaff 2014-02-11 11:48:44 CET
(In reply to Stefan Gohmann from comment #2)
> (In reply to Philipp Hahn from comment #1)
> > r47634 | Bug #33189: Updater: Fix evaluation of univentionUpdateActive
> > univention-updater_9.0.38-10.1245.201402042222
> > r47637 | Bug #33189,33194: Updater release policy
> 
> Code: OK
> Tests: Failed:

Fixed.
    univentionUpdateActive -> univentionUpdateActivate
    TRUE -> "TRUE"
3.2-0: r47725 | Bug #33189,#33194: updater --noninteractive
univention-updater_9.0.38-11.1247.201402111139
3.2-1: r47726 | Bug #33189,#33194: updater --noninteractive


> YAML: Fail:
>  s/updading/updating/
>  s/erratum update/update/

Fixed: r47727 | Bug #33189,#33194: updater --noninteractive YAML
Comment 4 Stefan Gohmann univentionstaff 2014-02-11 16:46:41 CET
YAML: OK
Code: OK
Tests: OK
Comment 5 Moritz Muehlenhoff univentionstaff 2014-02-12 10:26:13 CET
http://errata.univention.de/ucs/3.2/55.html