Univention Bugzilla – Bug 38393
System setup copies all setup packages
Last modified: 2015-05-07 17:43:20 CEST
Created attachment 6863 [details] system_setup_packages.diff Due to Bug #27935 the setup code copies all Debian packages from the local repository into the local cache otherwise the online repository is preferred. Depending on the performance it took several minutes. Either we should disable the online repository during the setup or we should create links. See attached patch.
*** Bug 38189 has been marked as a duplicate of this bug. ***
Patch applied, slightly modified to include error logging. r60407 univention-system-setup 8.1.66-37.878.201505051342 r60408 2015-05-05-univention-system-setup.yaml
When running the script standalone, I obtain the following error: -------------------- 8< -------------------- === 05_role/10role (2015-05-05 16:53:00) === __NAME__:05_role/10role Einrichten der Systemrolle __STEPS__:300 __MSG__:Vorbereiten der Paketlisten (das kann einen Moment dauern)... __ERR__:'RoleScript' object has no attribute 'logger' Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/setup/setup_script.py", line 304, in run success = self.inner_run() File "/usr/lib/univention-system-setup/scripts/05_role/10role", line 62, in inner_run self.logger.error('Error while creating hardlink to /var/cache/univention-system-setup/packages: %s' % e) AttributeError: 'RoleScript' object has no attribute 'logger' -------------------- 8< --------------------
Print errors because no logger is available (caller will log to setup.log anyways) r60426 univention-system-setup 8.1.66-39.880.201505051712
I could provoke the following error: -------------------- 8< -------------------- __MSG__:Vorbereiten der Paketlisten... Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 17] Die Datei existiert bereits Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 17] Die Datei existiert bereits __ERR__:`/var/cache/univention-system-setup/packages/libqtruby4shared2_4.8.4-1.2.201403150104_amd64.deb` and `/var/cache/apt/archives/libqtruby4shared2_4.8.4-1.2.201403150104_amd64.deb` are the same file Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/setup/setup_script.py", line 304, in run success = self.inner_run() File "/usr/lib/univention-system-setup/scripts/05_role/10role", line 64, in inner_run shutil.copy(filename, '/var/cache/apt/archives/') File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 69, in copyfile raise Error("`%s` and `%s` are the same file" % (src, dst)) Error: `/var/cache/univention-system-setup/packages/libqtruby4shared2_4.8.4-1.2.201403150104_amd64.deb` and `/var/cache/apt/archives/libqtruby4shared2_4.8.4-1.2.201403150104_amd64.deb` are the same file -------------------- 8< --------------------
Can you change the error message to be more informative? Currently, this line is printed for each failure: > Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 17] Die Datei existiert bereits
IOError is raised if not enough space is available on the disk: -------------------- 8< -------------------- === 05_role/10role (2015-05-05 18:22:45) === __NAME__:05_role/10role Einrichten der Systemrolle __STEPS__:300 __MSG__:Vorbereiten der Paketlisten... Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 18] Ungültiger Link über Gerätegrenzen hinweg Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 18] Ungültiger Link über Gerätegrenzen hinweg Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 18] Ungültiger Link über Gerätegrenzen hinweg Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 18] Ungültiger Link über Gerätegrenzen hinweg Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 18] Ungültiger Link über Gerätegrenzen hinweg Error while creating hardlink to /var/cache/univention-system-setup/packages: [Errno 18] Ungültiger Link über Gerätegrenzen hinweg __ERR__:[Errno 28] Auf dem Gerät ist kein Speicherplatz mehr verfügbar Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/setup/setup_script.py", line 304, in run success = self.inner_run() File "/usr/lib/univention-system-setup/scripts/05_role/10role", line 64, in inner_run shutil.copy(filename, '/var/cache/apt/archives/') File "/usr/lib/python2.7/shutil.py", line 119, in copy copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 84, in copyfile copyfileobj(fsrc, fdst) File "/usr/lib/python2.7/shutil.py", line 52, in copyfileobj fdst.write(buf) IOError: [Errno 28] Auf dem Gerät ist kein Speicherplatz mehr verfügbar -------------------- 8< -------------------- ... well, that might be a difficult error to recover from :) .
The errors you found are now catched as well. Log output has been improved. I found an instance in which pam-auth-update required user interaction, i added --force as a parameter to avoid that. r60449 univention-system-setup 8.1.66-40.881.201505061139 r60451 2015-05-05-univention-system-setup.yaml
The error handling looks fine now. Changes: OK YAML file: OK
<http://errata.univention.de/ucs/4.0/190.html>