Bug 701807 - Incorrect timezone setting: America/NewYork
Summary: Incorrect timezone setting: America/NewYork
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cobbler
Version: 15
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: James C.
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-03 22:04 UTC by Jacob Hunt
Modified: 2012-04-17 00:45 UTC (History)
11 users (show)

Fixed In Version: 2.2.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-17 00:45:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
settings.py patch (282 bytes, patch)
2011-05-03 22:04 UTC, Jacob Hunt
no flags Details | Diff

Description Jacob Hunt 2011-05-03 22:04:25 UTC
Created attachment 496649 [details]
settings.py patch

Description of problem:


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

cobbler-web-2.0.11-2.fc15.noarch


How reproducible:

Everytime

Steps to Reproduce:
1. Install and configure cobbler and cobbler-web
2. With a browser go to the webui "http://localhost/cobbler_web/"

  
Actual results:

You get the following mod_python error:
MOD_PYTHON ERROR

ProcessId:      6543
Interpreter:    '127.0.0.1'

ServerName:     '127.0.0.1'
DocumentRoot:   '/var/www/html'

URI:            '/cobbler_web/'
Location:       '/cobbler_web'
Directory:      None
Filename:       '/var/www/cobbler_web'
PathInfo:       '/'

Phase:          'PythonHandler'
Handler:        'django.core.handlers.modpython'

Traceback (most recent call last):

  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", line 213, in handler
    return ModPythonHandler()(req)

  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", line 174, in __call__
    self.load_middleware()

  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 39, in load_middleware
    for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__
    self._setup()

  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)

  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 125, in __init__
    raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)

ValueError: Incorrect timezone setting: America/NewYork



Expected results:

To have access to the webui


Additional info:

The timezone setting is incorrect in /usr/share/cobbler/web/settings.py, it should be America/New_York.  Once that is corrected the webui functions as expected.

Comment 1 Max E 2011-12-02 16:11:33 UTC
I can also confirm that this problem occurs in RHEL 5.7 / Centos 5.7 as well with Python 2.4.  I 'fixed' the problem by changing /usr/share/cobbler/web/settings.py changing America/NewYork with America/New_York - however, to also try and get around the problems, I went to the type zones file in /usr/share/zoneinfo and went into America and performed ln -s New_York NewYork   . This seems to get around any odd problems where the reference to NewYork is still made.  A small typo - really needs to be fixed.

Comment 2 Nico Kadel-Garcia 2012-03-03 15:54:17 UTC
It's still broken, in EPEL releases and Fedora 16. Here are my patches for the .spec file to fix this, some inappropriate reports about duplicated files in RPM compilation, and some permission errors for the web components. I'll submit separate bugs for those if necessary.

$ diff -u cobbler.spec  cobbler-fixed.spec
--- cobbler.spec        2011-09-09 16:01:55.000000000 -0400
+++ cobbler-fixed.spec  2012-03-03 10:51:44.462630731 -0500
@@ -94,6 +94,9 @@
 %prep
 %setup -q

+# Fix timezone default
+%{__sed} -i.timezone  's|America/NewYork|America/New_York|g' web/settings.py
+
 %build
 %{__python} setup.py build

@@ -468,16 +471,18 @@
 Web interface for Cobbler that allows visiting http://server/cobbler_web to configure the install server.

 %files -n cobbler-web
+%defattr(-,root,root)
+%doc AUTHORS COPYING CHANGELOG README
+%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
 %defattr(-,apache,apache)
 %dir /usr/share/cobbler/web
 /usr/share/cobbler/web/*
-%dir /usr/share/cobbler/web/cobbler_web
-/usr/share/cobbler/web/cobbler_web/*
-%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
+# Unnecessary, grabbed by above list
+#%dir /usr/share/cobbler/web/cobbler_web
+#/usr/share/cobbler/web/cobbler_web/*
 %dir /var/lib/cobbler/webui_sessions
 %dir /var/www/cobbler_webui_content
 /var/www/cobbler_webui_content/*
-%doc AUTHORS COPYING CHANGELOG README

 %changelog
 * Fri Sep  9 2011 Tom Callaway <spot> - 2.0.11-3

Comment 3 Greg Swift 2012-03-16 14:02:23 UTC
This needs to moved to the new issue tracker for cobbler

https://github.com/cobbler/cobbler/issues

Comment 4 Fedora Admin XMLRPC Client 2012-04-11 22:00:12 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 James C. 2012-04-17 00:45:03 UTC
This was fixed in the 2.2.x series. I'm going to close this issue here, and if it is still a problem please open a new ticket at the github issue tracker Greg posted above.


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