Re: Potential issue in Review Board 2.0 beta3

2014-02-26 Thread timc
Hi Chris,

Thanks for your reply!

On Tuesday, 25 February 2014 20:54:13 UTC, Christian Hammond wrote:


 What was the repro case? Just going to a URL?


Yup, attempting to access the root Review Board page for the first time.
 


 Try this and see what happens:

 $ rb-site manage /path/to/site shell
  from djblets.siteconfig.models import SiteConfiguration
  SiteConfiguration.objects.get_current()

 See if that raises an exception.


It does :)

 Python 2.7.3 (default, Jan  2 2013, 16:53:07) 
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
(InteractiveConsole)
 from djblets.siteconfig.models import SiteConfiguration
 SiteConfiguration.objects.get_current()
Traceback (most recent call last):
  File console, line 1, in module
  File 
/usr/local/lib/python2.7/dist-packages/Djblets-0.8beta2-py2.7.egg/djblets/siteconfig/managers.py,
 
line 50, in get_current
site = Site.objects.get_current()
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/contrib/sites/models.py,
 
line 47, in get_current
current_site = self.get(pk=sid)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/manager.py,
 
line 151, in get
return self.get_queryset().get(*args, **kwargs)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/query.py,
 
line 301, in get
num = len(clone)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/query.py,
 
line 77, in __len__
self._fetch_all()
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/query.py,
 
line 854, in _fetch_all
self._result_cache = list(self.iterator())
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/query.py,
 
line 220, in iterator
for row in compiler.results_iter():
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/sql/compiler.py,
 
line 709, in results_iter
for rows in self.execute_sql(MULTI):
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/sql/compiler.py,
 
line 782, in execute_sql
cursor.execute(sql, params)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/util.py,
 
line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/util.py,
 
line 53, in execute
return self.cursor.execute(sql, params)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/utils.py,
 
line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/util.py,
 
line 53, in execute
return self.cursor.execute(sql, params)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/sqlite3/base.py,
 
line 450, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: no such table: django_site

No such table... :/

I created another site and had a look at the logging: 

Creating database ... Creating tables ...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_site
Creating table django_session
...

Looks ok at that end... Using the sqlite3 command line (.tables / .schema), 
I can see that the 'reviewboard' db file does in fact contain a useful 
'django_site' table:

sqlite select * from django_site;
1|[MY_SERVER_NAME]|example.com


-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Potential issue in Review Board 2.0 beta3

2014-02-25 Thread timc
Hi all,

I've just upgraded a Debian Wheezy VM to the latest beta and I'm hitting an 
issue straight off the bat:

http://dpaste.com/1658355/

Context:

- We're using beta2 on another VM, mysql backend. Running fine.
- I cloned the VM and upgraded the new VM's Review Board using recommended 
method.
- I created a new site using rb-site, no hassles, sqlite3 backend.

If anyone's got a clue on this one, it'd be much appreciated. 
Alternatively, let me know what other information will be useful!

Cheers,
Tim

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Potential issue in Review Board 2.0 beta3

2014-02-25 Thread Christian Hammond
Hi Tim,

That's concerning. This should only be able to happen if accessing the site
configuration data throws an exception, which shouldn't happen.

What was the repro case? Just going to a URL?

Try this and see what happens:

$ rb-site manage /path/to/site shell
 from djblets.siteconfig.models import SiteConfiguration
 SiteConfiguration.objects.get_current()

See if that raises an exception.

If not,
edit 
/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0beta3-py2.7.egg/reviewboard/admin/siteconfig.py
and find this code:

try:
siteconfig = SiteConfiguration.objects.get_current()
except SiteConfiguration.DoesNotExist:
raise ImproperlyConfigured(
The site configuration entry does not exist in the database. 
Re-run `./manage.py` syncdb to fix this.)
except:
# We got something else. Likely, this doesn't exist yet and we're
# doing a syncdb or something, so silently ignore.
return

Change that last 'return' to 'raise', reload Apache, and repro again. See
what error comes up.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com


On Tue, Feb 25, 2014 at 9:09 AM, timc timcuss...@gmail.com wrote:

 Hi all,

 I've just upgraded a Debian Wheezy VM to the latest beta and I'm hitting
 an issue straight off the bat:

 http://dpaste.com/1658355/

 Context:

 - We're using beta2 on another VM, mysql backend. Running fine.
 - I cloned the VM and upgraded the new VM's Review Board using recommended
 method.
 - I created a new site using rb-site, no hassles, sqlite3 backend.

 If anyone's got a clue on this one, it'd be much appreciated.
 Alternatively, let me know what other information will be useful!

 Cheers,
 Tim

 --
 Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
 ---
 Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
 ---
 Happy user? Let us know at http://www.reviewboard.org/users/
 ---
 You received this message because you are subscribed to the Google Groups
 reviewboard group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to reviewboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
reviewboard group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.