Nach einem Upgrade von Katello stieß ich beim Aufrufen der Administrationsoberfläche auf den folgenden Fehler:
Ein Blick in das Protokoll des Webservers zeigte, dass offensichtlich ein Update der Datenbank das Problem verursachte:
# tail /var/log/httpd/foreman-ssl_error_ssl.log
[Wed Aug 17 09:42:51.536914 2016] [:error] [pid 3178] [remote 10.22.1.16:128] mod_wsgi (pid=3178): Target WSGI script '/usr/share/pulp/wsgi/webservices.wsgi' cannot be loaded as Python module.
[Wed Aug 17 09:42:51.536946 2016] [:error] [pid 3178] [remote 10.22.1.16:128] mod_wsgi (pid=3178): Exception occurred processing WSGI script '/usr/share/pulp/wsgi/webservices.wsgi'.
[Wed Aug 17 09:42:51.536960 2016] [:error] [pid 3178] [remote 10.22.1.16:128] Traceback (most recent call last):
[Wed Aug 17 09:42:51.536971 2016] [:error] [pid 3178] [remote 10.22.1.16:128] File "/usr/share/pulp/wsgi/webservices.wsgi", line 19, in <module>
[Wed Aug 17 09:42:51.536993 2016] [:error] [pid 3178] [remote 10.22.1.16:128] application = wsgi_application()
[Wed Aug 17 09:42:51.537000 2016] [:error] [pid 3178] [remote 10.22.1.16:128] File "/usr/lib/python2.7/site-packages/pulp/server/webservices/application.py", line 117, in wsgi_application
[Wed Aug 17 09:42:51.537010 2016] [:error] [pid 3178] [remote 10.22.1.16:128] raise e
[Wed Aug 17 09:42:51.537026 2016] [:error] [pid 3178] [remote 10.22.1.16:128] InitializationException: The database has not been migrated to the current version. Run pulp-manage-db and restart the application.
Um die Pulp-Datenbank zu aktualisieren muss das Programm pulp-manage-db als Apache-Benutzer ausgeführt werden. Hierzu ist es auch notwendig, kurzzeitig die Login-Shell zu ändern:
# chsh -s /bin/bash apache Changing shell for apache. Shell changed. # runuser -l apache -c pulp-manage-db Attempting to connect to localhost:27017 Attempting to connect to localhost:27017 Write concern for Mongo connection: {} Loading content types. Loading type descriptors [] Parsing type descriptors Validating type descriptor syntactic integrity Validating type descriptor semantic integrity ... Database migrations complete. # chsh -s /sbin/nologin apache Changing shell for apache. Shell changed.
Anschließend funktionierte die Web-Oberfläche wieder wie gewohnt.