Hi,

I'm battling some RB application errors following the upgrade and
would appreciate some assistance.

I try to upgrade the RB1.0/sqlite system to RB1.5/MySQL. Apache/
memcached/Ubuntu Linux are used with both versions.

Step 1: created a staging server with a clone of current installation
and db and upgraded it to rb1.5 (still with sqlite). This seemed to
work perfectly.

Step 2: migrated sqlite db dump to mysql format (scripts, mostly
syntax stuff).

Step 3: created yet another system with RB1.5/MySQL (fresh install)
and loaded the mysql data dump into it.

However, RB seems to be broken.
I get "error 500" accessing many of the pages.
Specifically, I'm able to login and see the list of existing reviews,
but as soon as I try to go to a specific review, I get "error 500".
That's the dump I keep getting in error.log:

ERROR:root:Exception thrown for user myuser at http://10.0.0.4/r/2679/

name 'null' is not defined
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.5-
py2.6.egg/reviewboard/accounts/decorators.py", line 22, in _check
    siteconfig = SiteConfiguration.objects.get_current()
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/siteconfig/managers.py", line 51, in get_current
    SiteConfiguration.objects.get(site=site)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/manager.py", line 132, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/query.py", line 336, in get
    num = len(clone)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/query.py", line 81, in __len__
    self._result_cache = list(self.iterator())
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/query.py", line 282, in iterator
    obj = self.model(*row[index_start:aggregate_start])
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/siteconfig/models.py", line 52, in __init__
    models.Model.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/base.py", line 340, in __init__
    signals.post_init.send(sender=self.__class__, instance=self)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/dispatch/dispatcher.py", line 162, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/util/fields.py", line 174, in post_init
    value = self.loads(value)
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/util/fields.py", line 206, in loads
    val = eval(val)
  File "<string>", line 1, in <module>
NameError: name 'null' is not defined

Tried to use rb-site manage shell to get the configuration settings
and got the same dump:

rb-site manage /var/www/reviews.mysite.com shell
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>  from djblets.siteconfig.models import SiteConfiguration
  File "<console>", line 1
    from djblets.siteconfig.models import SiteConfiguration
   ^
IndentationError: unexpected indent
>>> from djblets.siteconfig.models import SiteConfiguration
>>> siteconfig = SiteConfiguration.objects.get()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/manager.py", line 132, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/query.py", line 336, in get
    num = len(clone)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/query.py", line 81, in __len__
    self._result_cache = list(self.iterator())
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/query.py", line 282, in iterator
    obj = self.model(*row[index_start:aggregate_start])
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/siteconfig/models.py", line 52, in __init__
    models.Model.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/db/models/base.py", line 340, in __init__
    signals.post_init.send(sender=self.__class__, instance=self)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.3-py2.6.egg/
django/dispatch/dispatcher.py", line 162, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/util/fields.py", line 174, in post_init
    value = self.loads(value)
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.4-py2.6.egg/
djblets/util/fields.py", line 206, in loads
    val = eval(val)
  File "<string>", line 1, in <module>
NameError: name 'null' is not defined

The DB seems to be fine (schema-wise anyway) - I enabled query log in
mysql and catched the queries that were ran for this request - they
all seem to run fine manually:

>>> 101004 11:59:33      2947 Connect   r...@localhost on reviewboard
                 2947 Query     SET NAMES utf8
                 2947 Query     set autocommit=0
                 2947 Query     SELECT `siteconfig_siteconfiguration`.`id`,
`siteconfig_siteconfiguration`.`site_id`,
`siteconfig_siteconfiguration`.`version`,
`siteconfig_siteconfiguration`.`settings` FROM
`siteconfig_siteconfiguration`

mysql> SELECT `siteconfig_siteconfiguration`.`id`,
`siteconfig_siteconfiguration`.`site_id`,
`siteconfig_siteconfiguration`.`version`,
`siteconfig_siteconfiguration`.`settings` FROM
`siteconfig_siteconfiguration`\G
*************************** 1. row ***************************
      id: 1
 site_id: 1
 version: 1.5
settings: {'mail_host_password': '', 'cache_backend': 'memcached://
localhost:11211/', 'site_upload_temp_dir': null,
'locale_datetime_format': 'N j, Y, P', 'auth_ldap_tls': false,
'mail_host_user': '', 'auth_ad_use_tls': false,
'locale_year_month_format': 'F Y', 'auth_ldap_uid_mask':
'(sAMAccountName=%s)', 'mail_server_address': 'r...@localhost',
'auth_ldap_uri': 'ldap://10.0.0.1:389',
'diffviewer_context_num_lines': 5, 'diffviewer_paginate_orphans': 10,
'site_upload_max_memory_size': 2621440, 'auth_ad_search_root': '',
'mail_send_review_mail': true, 'site_media_root': '/var/www/
reviews.mysite.com/htdocs/media', 'locale_language_code': 'en-us',
'auth_nis_email_domain': '', 'logging_allow_profiling': false,
'auth_ldap_anon_bind_passwd': 'mypassword', 'cache_expiration_time':
2592000, 'site_prepend_www': false, 'auth_ldap_anon_bind_uid':
'cn=myuser,ou=unit,ou=ca,ou=company,dc=company,dc=com',
'auth_ldap_base_dn': 'OU=unit,DC=company,DC=com', 'mail_port': 25,
'auth_enable_registration': true, 'logging_directory': '/var/www/
reviews.mysite.com/logs', 'locale_month_day_format': 'F j',
'locale_time_format': 'P', 'locale_date_format': 'N j, Y',
'auth_ldap_email_domain': '', 'search_enable': true,
'auth_ldap_email_attribute': 'mail', 'auth_custom_backends': [''],
'diffviewer_include_space_patterns': [], 'mail_use_tls': false,
'site_admin_email': 'ad...@mysite.com', 'auth_backend': 'builtin',
'locale_timezone': 'US/Eastern', 'auth_ad_domain_controller': '',
'site_domain_method': 'http', 'search_index_file': '/usr/local/lib/
python2.6/dist-packages/ReviewBoard-1.5-py2.6.egg/reviewboard/search-
index/', 'diffviewer_paginate_by': 20, 'logging_enabled': true,
'auth_ad_find_dc_from_dns': false, 'auth_require_sitewide_login':
false, 'auth_ad_ou_name': '', 'locale_default_charset': 'utf-8',
'auth_ad_group_name': '', 'auth_ad_recursion_depth': null,
'mail_host': '10.0.0.135', 'diffviewer_syntax_highlighting': true,
'mail_default_from': 'webmas...@localhost', 'site_media_url': '/
media/', 'site_admin_name': 'admin', 'auth_ad_domain_name': ''}
1 row in set (0.00 sec)

So it seems that there's a configuration in DB, but some of it gets RB
confused?

I'm really not an expert in Python/Django (use perl most of the time),
so this dump seems a bit confusing - I would appreciate any ideas.

PS I tried to use rb-site manage /var/www/reviews.mysite.com/ dumpdata
to dump/restore the db, but got a "Error: Unable to serialize
database: ", so I had to resort to db level data migration scripts.

Thanks!
Michael


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to