| Summary: | "source toaster start" fail | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Diego Sueiro <diego.sueiro> |
| Component: | toaster | Assignee: | Alexandru Damian <alexandru.damian> |
| Status: | VERIFIED FIXED | QA Contact: | Ionut Chisanovici <ionutx.chisanovici> |
| Severity: | critical | ||
| Priority: | Medium+ | CC: | alexandru.c.georgescu, alexandru.damian, belen.barros.pena, bluelightning, bogdanx.a.voiculescu, dave.lerner, david.lerner, david.reyna, ionutx.chisanovici, jessica.zhang, razvanx.ionescu |
| Version: | unspecified | ||
| Target Milestone: | 1.6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Diego Sueiro
2013-11-06 19:44:29 UTC
I'm using Ubuntu 12.10. In review on toaster/master. Fix merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=af32d95f3beeb678fb59436445237efe53a36726 And dora/toaster: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dora-toaster&id=a6b357a9af161f7dae598a9477dd84cc431362f8 Verified on both: master:af32d95f3beeb678fb59436445237efe53a36726 dora:a6b357a9af161f7dae598a9477dd84cc431362f8 It happened on my Ubuntu 12.10 system with the following error:
jzhang@jzhang-desktop:~/poky-toaster/build$ source toaster start The system will start.
Traceback (most recent call last):
File "/home/jzhang/poky-toaster/bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 263, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 130, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/jzhang/poky-toaster/bitbake/lib/toaster/toastermain/settings.py", line 197, in <module>
from django.db.backends.signals import connection_created
File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 11, in <module>
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 158, in __init__
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: PST Traceback (most recent call last):
File "/home/jzhang/poky-toaster/bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 263, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 130, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/jzhang/poky-toaster/bitbake/lib/toaster/toastermain/settings.py", line 197, in <module>
from django.db.backends.signals import connection_created
File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 11, in <module>
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 158, in __init__
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: PST
Error on migration, trying to recover...
Traceback (most recent call last):
File "/home/jzhang/poky-toaster/bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 263, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 130, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/jzhang/poky-toaster/bitbake/lib/toaster/toastermain/settings.py", line 197, in <module>
from django.db.backends.signals import connection_created
File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 11, in <module>
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 158, in __init__
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: PST Traceback (most recent call last):
File "/home/jzhang/poky-toaster/bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 263, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 130, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/jzhang/poky-toaster/bitbake/lib/toaster/toastermain/settings.py", line 197, in <module>
from django.db.backends.signals import connection_created
File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 11, in <module>
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 52, in __getattr__
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 158, in __init__
raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)
ValueError: Incorrect timezone setting: PST Failed start.
This might be of interest: http://stackoverflow.com/questions/5750150/invalid-django-time-zone It could be that we need to have some more intelligent code setting this value. On Wednesday 26 February 2014 17:41:04 Lerner, Dave wrote: > 1) pytz doesn't seem to fix the problem. > I did not have pytz installed, import pytz failed. Then I used > easy_install to add pytz and import pytz didn't fail. However, I get > the error message > > ValueError: Incorrect timezone setting: CST > > which is the correct timezone setting, I'm in Central Standard Time, > Chicago. > > 2) Changing toaster/toastermain/settings.py from > - TIME_ZONE = time.tzname[0] > + TIME_ZONE = None > let's toaster boot, with a change only to our code. > > > Also, > > In a python shell the following does NOT raise an error: > >>> import time > >>> TIME_ZONE=time.tzname[0] > > or even > > >>> import time > >>> import pytz > >>> TIME_ZONE=time.tzname[0] > > Does anyone have a system where toaster boots without raising the error? > > Dave > > > -----Original Message----- > > From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com] > > Sent: Wednesday, February 26, 2014 11:23 AM > > To: Barros Pena, Belen > > Cc: Reyna, David; Lerner, Dave; Ravi Chintakunta; Zhang, Jessica; > > Damian, Alexandru Subject: Re: time zone Bugzilla issue > > > > On Wednesday 26 February 2014 17:16:32 Barros Pena, Belen wrote: > > > Well, this is the issue I remembered: > > > > > > https://bugzilla.yoctoproject.org/show_bug.cgi?id=5499 > > > > > > But it is set to verified fixed. I can either reopen it or file a > > > new > > > one: > > > let me know what you think is best. > > > > The key is - is the error in the traceback the same as bug 5499 or a > > different one? > > > > Also, for the people experiencing the bug - do you have pytz > > installed or not? > > > > Cheers, > > Paul > > > > -- > > > > Paul Eggleton > > Intel Open Source Technology Centre TIME_ZONE is supposed to be like the default for Django 'America/Chicago', but the time.tzname(0) or (1) returns 'CST' or 'CDT', clearly not correct. I found the following to get a timezone string like above. @@ -51,8 +51,9 @@ ALLOWED_HOSTS = [] # In a Windows environment this must be set to your system time zone. # Always use local computer's time zone -import time -TIME_ZONE = time.tzname[0] +import pytz # $pip install pytz +from tzlocal import get_localzone # $ pip install tzlocal +TIME_ZONE = str(get_localzone()) Testing it now with a build so I can examine the build time. -dave The fix in my last comment works on ubuntu 12.04 based on examination of a new build's completion time on the All Builds screen. Patch available on bitbake-devel mailing list, due to the High/Critical importance of this bug. From the bitbake-devel mailing list: On 13/03/2014 11:24, "Damian, Alexandru" <alexandru.damian@intel.com> wrote: I hear you, thanks for the input on various configurations. Please do not submit this patch, I'll come back with a v2. Ross, I tried time.tzname (as it currently stands) and it doesn't provide a /usr/share/zoneinfo/ compatible name :(. Alex On Thu, Mar 13, 2014 at 10:11 AM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote: On Wednesday 12 March 2014 18:49:02 Damian, Alexandru wrote: This is a Debian-ism :( You say that, but the Fedora 20 install I have here (a) doesn't have TZ and (b) has /etc/localtime -> ../usr/share/zoneinfo/Europe/London. On my CentOS 6.5 machine (possibly irrelevant for Toaster, but...) TZ is also unset but /etc/localtime is just a plain copy of some timezone file rather than a symlink. Older RH-style systems such as CentOS 6 have a ZONE value in /etc/sysconfig/clock but Fedora appears to have eliminated this file. Given that, I don't think this is a complete fix. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre New patch sent to bitbake-devel and toaster mailing lists. We reverse-match /etc/localtime into /usr/share/zoneinfo/ if the TZ is not set. Demoting this from High since the critical issue was resolved. This is verified. Cheers, Ionut C |