Bug 42402 - ucs-4.2 fails to install server role package
ucs-4.2 fails to install server role package
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: System setup
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.1-3-errata
Assigned To: Erik Damrose
Stefan Gohmann
:
Depends on: 38382
Blocks: 41961 42452
  Show dependency treegraph
 
Reported: 2016-09-15 12:30 CEST by Philipp Hahn
Modified: 2016-09-26 11:26 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 1.000
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional): External feedback, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2016-09-15 12:30:54 CEST
=== RUNNING SETUP JOIN SCRIPT (2016-09-15 11:45:48) ===

Reset UCR variables
run-parts: executing /usr/lib/univention-system-setup/scripts/00_system_setup/10clear_fast_demo_mode_settings
W: The config registry variable 'kerberos/kpasswdserver' does not exist
W: The config registry variable 'saml/idp/certificate/certificate' does not exist
W: The config registry variable 'saml/idp/certificate/privatekey' does not exist
W: The config registry variable 'saml/idp/entityID' does not exist
W: The config registry variable 'ucs/server/saml-idp-server/master.ucs.example' does not exist
W: The config registry variable 'ucs/server/sso/fqdn' does not exist
W: The config registry variable 'umc/saml/idp-server' does not exist
W: The config registry variable 'umc/saml/trusted/sp/master.ucs.example' does not exist
Starting re-configuration of locales
run-parts: executing /usr/lib/univention-system-setup/scripts/15_keyboard/10keyboard
=== 15_keyboard/10keyboard (2016-09-15 11:45:49) ===
__NAME__:15_keyboard/10keyboard Einrichten des Tastaturlayouts
run-parts: executing /usr/lib/univention-system-setup/scripts/20_language/10language
=== 20_language/10language (2016-09-15 11:45:49) ===
__NAME__:20_language/10language Erstellen der Locale-Daten
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.
Setting locale
File: /var/www/ucs-overview/entries.json
File: /var/www/ucs-overview/languages.json
File: /etc/locale.gen
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.
run-parts: executing /usr/lib/univention-system-setup/scripts/20_language/11default_locale
=== 20_language/11default_locale (2016-09-15 11:45:53) ===
__NAME__:20_language/11default_locale Setzen der Standard-Locale
cp: der Aufruf von stat für „/etc/univention/ssl/unassigned-hostname.unassigned-domain/cert.pem“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
cp: der Aufruf von stat für „/etc/univention/ssl/unassigned-hostname.unassigned-domain/private.key“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Create apache2/ssl/certificate
Create apache2/ssl/key
Create apache2/ssl/ca
Multifile: /etc/apache2/sites-available/default-ssl.conf
=== 10_basis/50uuid (2016-09-15 11:45:54) ===
__NAME__:10_basis/50uuid UUID generieren
Create uuid/system
File: /etc/apt/apt.conf.d/55user_agent
File: /etc/apt/sources.list.d/15_ucs-online-version.list
File: /etc/apt/sources.list.d/20_ucs-online-component.list
Ign cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21] ucs420 InRelease
Ign cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21] ucs420 Release.gpg
Ign cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21] ucs420 Release
Paketlisten werden gelesen...
=== 05_role/10role (2016-09-15 11:45:56) ===
__NAME__:05_role/10role Einrichten der Systemrolle
__STEPS__:300
__MSG__:Vorbereiten der Paketlisten...
__STEP__:0
__MSG__:0% [Verarbeiten]
__MSG__:Ign  cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21] ucs420 InRelease
__MSG__:33% [Verarbeiten]
__MSG__:33% [Verarbeiten]
__MSG__:Ign  cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21] ucs420 Release.gpg
__MSG__:50% [Verarbeiten]
__MSG__:50% [Verarbeiten]
__MSG__:Ign  cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21] ucs420 Rele
ase
__MSG__:60% [Verarbeiten]
__MSG__:60% [Verarbeiten]
__MSG__:80% [Verarbeiten]
__MSG__:Es wurden 0 B in 0 s geholt (0 B/s)
File: /etc/welcome.msg
File: /etc/krb5.conf
File: /etc/issue
File: /etc/default/ntpdate
File: /etc/issue.net
File: /etc/runit/univention-directory-listener/run
File: /usr/share/univention-management-console/modules/setup-certificate.xml
File: /etc/ntp.conf
__MSG__:0% [Verarbeiten]
__MSG__:Medienwechsel: Bitte legen Sie das Medium mit dem Namen
 »UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21«
in Laufwerk »/media/cdrom/« ein und drücken Sie die Eingabetaste.
Error in function media_change
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apt/progress/text.py", line 225, in media_change
    return input() not in ('c', 'C')
EOFError: EOF when reading a line
__MSG__:0% [Verarbeiten]
__MSG__:0% [Verarbeiten]
__MSG__:Fehl cdrom://[UCS GNU/Linux 4.2-0 _Ucs420_ - Official Release amd64 DVD Binary-1 20160915-09:21]/ ucs420/mai
n libevent-2.0-5 amd64 2.0.21-stable-2
__MSG__:Medium nicht gefunden
__MSG__:0% [Verarbeiten]
...

+++ This bug was initially created as a clone of Bug #38382 +++
Comment 1 Philipp Hahn univentionstaff 2016-09-15 13:04:47 CEST
r72101 from Bug #42122 broke it: The packages from the DVD are no longer copied to /var/cache/apt/archives/ and thus can't be installed as the DVD is not mounted in the chroot environment.

Workaround:
 # Ctrl-Alt-F2
 mount --bind /cdrom /target/media/cdrom0
 chroot /target /usr/share/univention-system-setup/download-packages


Maybe:
./packages/pkgsel/debian/postinst:70 log-output -t pkgsel umount /cdrom || true

apt-setup: umount: can't umount /target/media/cdrom0: Invalid argument

./packages/apt-setup/load-install-cd
Comment 2 Erik Damrose univentionstaff 2016-09-15 13:22:24 CEST
(In reply to Philipp Hahn from comment #1)
> r72101 from Bug #42122 broke it: The packages from the DVD are no longer
> copied to /var/cache/apt/archives/ and thus can't be installed as the DVD is
> not mounted in the chroot environment.

fyi: download-packages downloads to /var/cache/univention-system-setup/packages/

As discussed, the old behavior to copy the packages during DVD install is just proloning the installation process. While fixing Bug #42122 we were under the impression that the packages would be taken from the DVD anyway.

As further discussed, the DVD could be mounted in
univention-system-setup/debian/di-univention-system-setup.postinst
and it has to be made sure that a sources.list entry makes it available as a package source.
Comment 3 Philipp Hahn univentionstaff 2016-09-20 14:29:28 CEST
(In reply to Philipp Hahn from comment #1)
> r72101 from Bug #42122 broke it: The packages from the DVD are no longer
> copied to /var/cache/apt/archives/ and thus can't be installed as the DVD is
> not mounted in the chroot environment.
> 
> Workaround:
>  # Ctrl-Alt-F2
   umount /cdrom

The CD-ROM just has be be unmounted in the installer environment, so the chroot environment can mount it itself - currently that fails because /dev/sr0 is already mounted. (looking at "apt-install" it also unmounts the CD-ROM before installing packages inside the chroot environment)

Untested:

diff --git a/branches/ucs-4.2/ucs-4.2-0/base/univention-system-setup/debian/di-univention-system-setup.postinst b/branches/ucs-4.2/ucs-4.2-0/base/univention-system-setup/debian/di-univention-system-setup.postinst
index 24287f7..7414ac5 100755
--- a/branches/ucs-4.2/ucs-4.2-0/base/univention-system-setup/debian/di-univention-system-setup.postinst
+++ b/branches/ucs-4.2/ucs-4.2-0/base/univention-system-setup/debian/di-univention-system-setup.postinst
@@ -52,6 +52,12 @@ db_progress INFO di-univention-system-setup/progress/uss
 # activate univention-system-setup-boot
 in-target /usr/sbin/ucr set system/setup/boot/start=true
 # start univention-system-setup if in GTK mode
+REMOUNT_CD=false
+if [ -e /var/lib/install-cd.id ] && mountpoint /cdrom
+then
+       REMOUNT_CD=true
+       log-output -t apt-install umount /cdrom || :
+fi
 if [ -n "$DISPLAY" ]; then
        chroot /target /usr/share/univention-system-setup/startxwithfirefox --installer
 else
@@ -59,6 +65,7 @@ else
        db_progress INFO di-univention-system-setup/progress/usstextmode
        chroot /target /usr/share/univention-system-setup/startxwithfirefox --installertext
 fi
+"$REMOUNT_CD" || load-install-cd "/target" || :
 
 ussbootflag="$(chroot /target /usr/sbin/ucr get system/setup/boot/start)"
 if [ "$ussbootflag" = "true" -o "$ussbootflag" = "yes" ] ; then
Comment 4 Erik Damrose univentionstaff 2016-09-21 15:41:46 CEST
The patch had to be modified, e.g. mountpoint is not available in debian installer.

r72730 univention-system-setup 9.0.4-42.986.201609211537
r72731 yaml

TODO: build new DVD, test, merge to ucs4.2
Comment 5 Erik Damrose univentionstaff 2016-09-22 13:25:32 CEST
Some fixes in r72737, yaml adapted.

I tested with a current UCS 4.1-3 DVD (ucs_4.1-3-20160922-095010-dvd-amd64.iso), the packages were successfully installed from the DVD.

r72747 merge to ucs 4.2: univention-system-setup 10.0.0-10A~4.2.0.201609221322
Comment 6 Stefan Gohmann univentionstaff 2016-09-23 07:45:47 CEST
Code review: OK

Merge to UCS 4.2: OK

Tests: OK (installation and appliance generation + installation)

YAML: OK (fixed typo: r72766)
Comment 7 Janek Walkenhorst univentionstaff 2016-09-23 13:53:16 CEST
<http://errata.software-univention.de/ucs/4.1/278.html>