Univention Bugzilla – Bug 50410
univention-pkgdb initialization during system-setup fails sometime in AppCenter tests
Last modified: 2020-03-09 11:32:05 CET
system setup package installation: etting up univention-pkgdb (12.0.1-1A~4.4.0.201812211058) ... File: /etc/cron.d/univention-pkgdb-check Multifile: /etc/postgresql/9.6/main/pg_hba.conf File: /etc/logrotate.d/univention-pkgdb Create pgsql/pkgdb/networks Create pkgdb/scan File: /etc/apt/apt.conf.d/61invoke Multifile: /etc/postgresql/9.6/main/pg_hba.conf psql: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis nicht gefunden Läuft der Server lokal und akzeptiert er Verbindungen auf dem Unix-Domain-Socket »/var/run/postgresql/.s.PGSQL.5432«? system setup join: [master100] 2019-10-24T11:18:04.270884 24.10.19 11:18:04.276 LISTENER ( WARN ) : initializing module pkgdb [master100] 2019-10-24T11:18:04.406434 Traceback (most recent call last): [master100] 2019-10-24T11:18:04.406692 File "/usr/sbin/univention-pkgdb-scan", line 37, in <module> [master100] 2019-10-24T11:18:04.406937 univention.pkgdb.main() [master100] 2019-10-24T11:18:04.407234 File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 576, in main [master100] 2019-10-24T11:18:04.407464 connection = open_database_connection(config_registry, pkgdbu=True) [master100] 2019-10-24T11:18:04.407657 File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 554, in open_database_connection [master100] 2019-10-24T11:18:04.408144 connection_info['password'] = open(password_file, 'rb').read().rstrip('n') [master100] 2019-10-24T11:18:04.408390 IOError: [Errno 2] No such file or directory: '/etc/postgresql/pkgdb.secret' after that, the join script fails too [master100] 2019-10-24T11:19:33.653499 Configure 50univention-pkgdb.inst Thu Oct 24 11:19:33 CEST 2019 [master100] 2019-10-24T11:19:33.657361 2019-10-24 11:19:33.665203572+02:00 (in joinscript_init) [master100] 2019-10-24T11:19:34.504092 Adding SRV record "pkgdb tcp 0 0 5432 master100.autotest100.local." to zone autotest100.local... [master100] 2019-10-24T11:19:34.504092 done [master100] 2019-10-24T11:20:35.109597 Traceback (most recent call last): [master100] 2019-10-24T11:20:35.110214 File "/usr/sbin/univention-pkgdb-scan", line 37, in <module> [master100] 2019-10-24T11:20:35.110214 univention.pkgdb.main() [master100] 2019-10-24T11:20:35.110214 File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 576, in main [master100] 2019-10-24T11:20:35.110214 connection = open_database_connection(config_registry, pkgdbu=True) [master100] 2019-10-24T11:20:35.110425 File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 554, in open_database_connection [master100] 2019-10-24T11:20:35.110732 connection_info['password'] = open(password_file, 'rb').read().rstrip('n') [master100] 2019-10-24T11:20:35.111028 IOError: [Errno 2] No such file or directory: '/etc/postgresql/pkgdb.secret' [master100] 2019-10-24T11:20:35.135371 __MSG__:Configure 79univention-printserver [master100] 2019-10-24T11:20:35.135371 __STEP__:49 and we end up with an unconfigured system
removed univention-pkgdb from autotest-100-app-master-no-samba.cfg once this is fixed, please re-add univention-pkgdb to autotest-100-app-master-no-samba.cfg
(In reply to Felix Botner from comment #1) > removed univention-pkgdb from autotest-100-app-master-no-samba.cfg > > once this is fixed, please re-add univention-pkgdb to > autotest-100-app-master-no-samba.cfg also removed from autotest-120-appupdate-master-no-samba.cfg
also from autotest-101-app-master-s4.cfg
Currently happening on ucs@school 4.3->4.4 tests as well: https://jenkins.knut.univention.de:8181/job/UCSschool-4.4/job/Upgrade%20Singleserver/lastCompletedBuild/Config=s4-all-components,TestGroup=base1/testReport/00_checks/01_univention_system_check/master206/
This is caused in part by bug 50441. Until "univention-system-setup-boot.service" had not failed due to a timeout, the service is considered starting. But this service is part of the "multi-user.target" which means the target isn't reached until the timeout marks the service as failed. The postgresql-9.6.postinst does create a cluster and starts it with "invoke-rc.d". "invoke-rc.d" adds "--job-mode=ignore-dependencies" than starting a service before reaching the "multi-user.target". The actual postgres cluster is a dependency for the "postgres.service" and therefore isn't started because the multi-user.target isn't reached. How to reproduce: Start one of our appliance images and immediately install postgres-9.6 -> the postgres cluster isn't started If you stop the "univention-system-setup-boot.service" or wait for the timeout and install postgres-9.6, the postgres cluster gets started.