当我尝试加载 cobbler 2.8.4 网页时,我在 /var/log/httpd/ssl_error_log 中看到以下错误
Traceback (most recent call last):
File "/usr/share/cobbler/web/cobbler.wsgi", line 26, in application
_application = get_wsgi_application()
File "/usr/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
django.setup(set_prefix=False)
File "/usr/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/share/cobbler/web/settings.py", line 89, in <module>
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
ImportError: cannot import name TEMPLATE_CONTEXT_PROCESSORS
python2-django-1.11.20-1.el7.noarch
cobbler-2.8.4-4.el7.x86_64
cobbler-web-2.8.4-4.el7.noarch
看起来 Django 已经在 EPEL 中更新到 1.11,这对上下文处理器的处理方式进行了一些更改。代码 cobbler 试图在这里调用已被弃用并在不久前从 Django 中删除,因此 cobbler 需要更新。在 Red Hat Bugzilla 中提交针对 cobbler 的错误报告。