Bug 975802 - Cobbler web does not display [NEEDINFO]
Cobbler web does not display
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora EPEL
Classification: Fedora
Component: cobbler (Show other bugs)
el6
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: James C.
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-19 07:40 EDT by shaun
Modified: 2014-07-17 13:26 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-17 13:26:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
orion: needinfo? (shaunmegaw)


Attachments (Terms of Use)
This is the error you get when trying to display the cobbler web login page (173.54 KB, image/png)
2013-06-19 07:40 EDT, shaun
no flags Details

  None (edit)
Description shaun 2013-06-19 07:40:24 EDT
Created attachment 762884 [details]
This is the error you get when trying to display the cobbler web login page

Description of problem:
When installing cobbler-web from the Epel repository on Centos 6.4, If one navigates to https://ipaddress/cobbler_web you get an error:

ImproperlyConfigured at /
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
Request Method:	GET
Request URL:	https://172.16.0.159/cobbler_web/
Django Version:	1.4.5
Exception Type:	ImproperlyConfigured
Exception Value:	
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
Exception Location:	/usr/lib/python2.6/site-packages/django/template/loader.py in find_template_loader, line 101
Python Executable:	/usr/bin/python
Python Version:	2.6.6
Python Path:	
['/usr/lib64/python26.zip',
 '/usr/lib64/python2.6',
 '/usr/lib64/python2.6/plat-linux2',
 '/usr/lib64/python2.6/lib-tk',
 '/usr/lib64/python2.6/lib-old',
 '/usr/lib64/python2.6/lib-dynload',
 '/usr/lib64/python2.6/site-packages',
 '/usr/lib64/python2.6/site-packages/gtk-2.0',
 '/usr/lib/python2.6/site-packages',
 '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
 '/usr/share/cobbler/web',
 '/usr/share/cobbler/web/cobbler_web']
Server time:	Wed, 19 Jun 2013 13:35:05 +0200




Version-Release number of selected component (if applicable):

cobbler-web                   noarch             2.2.3-2.el6                         epel                284 k

How reproducible:

1. disable selinux and firewall

2. rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

3. yum install cobbler cobbler-web pykickstart syslinux tftp

4. /etc/init.d/httpd restart

OPEN BROWSER

5. https://ipaddress/cobbler_web

This will render the error


Actual results:

Error page


Expected results:

Display the cobbler web login page


Additional info:

To fix this issue you need to edit the following:

vi /usr/share/cobbler/web/settings.py

and replace it with the git contents found on https://github.com/cobbler/cobbler/blob/master/web/settings.py

Namely the following

###############REPLACE####################

# Django settings for cobbler-web project.
import django

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = ''     # cobbler-web does not use a database
DATABASE_NAME = ''       
DATABASE_USER = ''       
DATABASE_PASSWORD = ''   
DATABASE_HOST = ''       
DATABASE_PORT = ''       

# Force Django to use the systems timezone
TIME_ZONE = None

# Language section
# TBD.
LANGUAGE_CODE = 'en-us'
USE_I18N = False

SITE_ID = 1

# not used
MEDIA_ROOT = ''
MEDIA_URL = ''
ADMIN_MEDIA_PREFIX = '/media/'

SECRET_KEY = ''

# code config

if django.VERSION[0] == 1 and django.VERSION[1] < 4:
    TEMPLATE_LOADERS = (
        'django.template.loaders.filesystem.load_template_source',
        'django.template.loaders.app_directories.load_template_source',
    )
else:
    TEMPLATE_LOADERS = (
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
    )

if django.VERSION[0] == 1 and django.VERSION[1] < 2:
    # Legacy django had a different CSRF method, which also had 
    # different middleware. We check the vesion here so we bring in 
    # the correct one.
    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.contrib.csrf.middleware.CsrfMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
    )
else:
    MIDDLEWARE_CLASSES = (
        'django.middleware.common.CommonMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
    )

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
    '/usr/share/cobbler/web/templates',
)
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'cobbler_web',
)

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS

TEMPLATE_CONTEXT_PROCESSORS += (
     'django.core.context_processors.request',
) 
     
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
SESSION_FILE_PATH = '/var/lib/cobbler/webui_sessions'
Comment 1 Orion Poplawski 2014-04-21 13:58:29 EDT
Is this still an issue with 2.4.0-1.el6?

Note You need to log in before you can comment on or make changes to this bug.