Univention Bugzilla – Bug 44821
Updater should remove sources.list entry of the new release if the master still uses the old UCS version
Last modified: 2017-09-27 06:50:42 CEST
The updater should remove the sources list entry of the new release if the upgrade didn't really start for example if the master hasn't been updated or the ignoressh parameter is missing: root@slave423:~# ls /etc/apt/sources.list.d/* /etc/apt/sources.list.d/15_ucs-online-version.list /etc/apt/sources.list.d/20_ucs-online-component.list root@slave423:~# univention-upgrade --ignoressh --ignoreterm Starting univention-upgrade. Current UCS version is 4.2-0 errata45 Checking for local repository: none Checking for package updates: none Checking for app updates: none Checking for release updates: found: UCS 4.2-1 Do you want to update to 4.2-1 [Y|n]? y Starting update to UCS version 4.2-1 HINT: Please check the release notes carefully BEFORE updating to UCS 4.2-1: English version: https://docs.software-univention.de/release-notes-4.2-1-en.html German version: https://docs.software-univention.de/release-notes-4.2-1-de.html Please also consider documents of following release updates and 3rd party components. Do you want to continue [Y/n]? y Checking for space on /var/cache/apt/archives: OK Checking for space on /boot: OK Checking for space on /: OK Checking for package status: OK Checking LDAP schema: OK WARNING: Your domain controller master is still on version 4.2-0. It is strongly recommended that the domain controller master is always the first system to be updated during a release update. This check can be skipped by setting the UCR variable update42/ignore_version to yes. Error: Please check "/var/log/univention/updater.log" for details. ERROR: update failed. Please check /var/log/univention/updater.log root@slave423:~# cat /etc/apt/sources.list.d/00_ucs_update_in_progress.list deb http://apt.knut.univention.de/4.2/maintained/ 4.2-1/all/ deb http://apt.knut.univention.de/4.2/maintained/ 4.2-1/amd64/ root@slave423:~#
r80435 | Bug #44821 up: Remove temporary sources list on preup failure Package: univention-updater Version: 12.0.11-2A~4.2.0.201706230818 Branch: ucs_4.2-0 Scope: errata4.2-1 r80437 | Bug #44821, Bug #44842 updater.yaml r80436 | Bug #44821, Bug #44842 updater.yaml
For QA: I copied the updated scripts to the test mirrors; after QA they must be copied to the public mirror (mirror/ftp) as well: cd /var/univention/buildsystem2/test_mirror/ftp/4.2/maintained/4.2-1/all cp -v ~/GIT2/base/univention-updater/script/p*up.sh . repo-ng-sign-release-file -i preup.sh -o preup.sh.gpg -p /etc/archive-keys/ucs4.0.txt -k 6B8BFD3C repo-ng-sign-release-file -i postup.sh -o postup.sh.gpg -p /etc/archive-keys/ucs4.0.txt -k 6B8BFD3C cd /var/univention/buildsystem2/mirror/testing/4.2/maintained/4.2-1/all cp -v ~/GIT2/base/univention-updater/script/p*up.sh . repo-ng-sign-release-file -i preup.sh -o preup.sh.gpg -p /etc/archive-keys/ucs4.0.txt -k 6B8BFD3C repo-ng-sign-release-file -i postup.sh -o postup.sh.gpg -p /etc/archive-keys/ucs4.0.txt -k 6B8BFD3C sudo update_mirror.sh -v testing/4.2/maintained/4.2-1/all
Code review: OK Tests: OK UCS test: OK YAML: OK
<http://errata.software-univention.de/ucs/4.2/151.html>
seems that this is not yet published. I need to make changes to the 4.2-1 postup.sh for Bug #45328 but there are changes on the testing/4.2/maintained/4.2-1/all/postup.sh script: diff -Nur ftp/4.2/maintained/4.2-1/all/postup.sh testing/4.2/maintained/4.2-1/all/postup.sh --- ftp/4.2/maintained/4.2-1/all/postup.sh 2017-06-20 16:47:09.846276213 +0200 +++ testing/4.2/maintained/4.2-1/all/postup.sh 2017-09-12 17:04:43.476689765 +0200 @@ -156,6 +156,12 @@ repository/online/component/4.2-1-errata/description="Errata updates for UCS 4.2-1" \ repository/online/component/4.2-1-errata/version="4.2" >>"$UPDATER_LOG" 2>&1 +# Bug 45328 +# update/register appcenter at this point because 4.2-0 postup still is in 4.1 mode +univention-app update || true +univention-app register --app || true +# Bug 45328 + # run remaining joinscripts if [ "$server_role" = "domaincontroller_master" ]; then univention-run-join-scripts >>"$UPDATER_LOG" 2>&1 @@ -189,7 +195,4 @@ service apache2 restart >>"$UPDATER_LOG" 2>&1 EOF -# Bug #44346: Pin temporary sources list -rm -f /etc/apt/sources.list.d/00_ucs_update_in_progress.list -
sudo update_mirror.sh -v ftp/4.2/maintained/4.2-1/all
OK
Can be closed