3576: Upgrade from 1.7.20 to 2.0.7 failed

vlo****@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 26, 2014
What version are you running?
1.7.20

What's the URL of the page containing the problem?
/

What steps will reproduce the problem?
1. sudo easy_install -U ReviewBoard
2. sudo rb-site upgrade /var/www/reviewboard
3. sudo /etc/init.d/nginx restart
4. Open reviewboard in browser

What is the expected output? What do you see instead?
I get a 500 error:
Something broke! (Error 500)

It appears something broke when you tried to go to here. This is either a bug in Review Board or a server configuration error. Please report this to your administrator.

I get an email with the following stacktrace:
Traceback (most recent call last):

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/core/handlers/base.py", line 89, in get_response
   response = middleware_method(request)

 File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.20-py2.6.egg/reviewboard/accounts/middleware.py", line 12, in process_request
   user = Profile.objects.get(user=request.user)

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/models/manager.py", line 131, in get
   return self.get_query_set().get(*args, **kwargs)

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/models/query.py", line 361, in get
   num = len(clone)

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/models/query.py", line 85, in __len__
   self._result_cache = list(self.iterator())

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/models/query.py", line 291, in iterator
   for row in compiler.results_iter():

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/models/sql/compiler.py", line 763, in results_iter
   for rows in self.execute_sql(MULTI):

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/models/sql/compiler.py", line 818, in execute_sql
   cursor.execute(sql, params)

 File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
   return self.cursor.execute(query, args)

DatabaseError: column accounts_profile.show_submitted does not exist
LINE 1: ..."is_private", "accounts_profile"."open_an_issue", "accounts_...

What operating system are you using? What browser?
OracleServer 6.4

Please provide any additional information below.
Any workaround/recovery steps would be appreciated.
chipx86
#1 chipx86
That stacktrace shows that you're still running Review Board 1.7.20, but now with a 2.0.7 database. You'll need to find out why it's using the wrong version.

Can you see where the new Review Board egg directory is? I want to be sure that it was installed with Python 2.6 and not 2.7.
  • +NeedInfo
#2 vlo****@gmai***** (Google Code) (Is this you? Claim this profile.)
How would I go about doing this?
#3 vlo****@gmai***** (Google Code) (Is this you? Claim this profile.)
ls /usr/lib/python2.6/site-packages/ReviewBoard-
ReviewBoard-1.7.20-py2.6.egg/ ReviewBoard-2.0.7-py2.6.egg/  
#4 vlo****@gmai***** (Google Code) (Is this you? Claim this profile.)
Hmm... I've uninstall reviewboard & dependencies from scratch & installed it again.
I've restarted the web server & memchached.  Yet the stack trace still shows RB 1.7.20 & django 1.4.10

Clearly python is still in some process somewhere, but I can't figure out where.
chipx86
#5 chipx86
Are you using Apache, or just nginx?
#6 vlo****@gmai***** (Google Code) (Is this you? Claim this profile.)
I think I found it.  I'm using just nginx & uwsgi is still running.  Can't figure out who owns that process, but I'll figure it out.   Thanks.

Any idea why the old reviewboard was left around after easy_install -U?
chipx86
#7 chipx86
easy_install doesn't actually remove old versions of packages, since generally-speaking, Python modules of different versions can be co-installed (if the applications request a specific version).

It wouldn't have hurt to keep the 1.7.x release on there. The reason things failed were, as you noted, the uwsgi process. Once you restart that, it should find the correct version of Review Board.
david
#8 david
  • -NeedInfo
    +SetupIssue
#9 vlo****@gmai***** (Google Code) (Is this you? Claim this profile.)
Ah.  Maybe the guide should be updated or there's some better integration to be done with Nginx/UWSGI?