Re: site migration

2020-07-29 Thread Adam Weremczuk
Hello again,

For illustration purposes my source site is called "rb-test.example.com",
runs over http and contains some data (comments, git repositories etc.)
Destination is called "rebo.example.com", runs over https, and contains no
data.
All usernames and passwords (including MySQL) are the same on both.

I've tried the following:

1. Migrated db as before (checked the sql dump for any occurrences of
"rb-test" or "http" but there were none)

2. Moved the entire rb-test:/var/www/rb-test.example.com directory to
rebo:/var/www/rebo.example.com

3. Searched recursively for any occurrence of "rb-test" and replaced it
with "rebo" in:
conf/settings_local.pyc
conf/cron.conf
conf/apache-wsgi.conf
conf/settings_local.py
htdocs/reviewboard.wsgi

4. Replaced SECRET_KEY in conf/settings_local.py to match the database i.e.
rb-test

5. Rebooted the rebo container.

MY ERRORS:

Environment:

Request Method: GET
Request URL: https://rebo.example.com/

Django Version: 1.6.11
Python Version: 2.7.13
Installed Applications:
[u'corsheaders',
 u'django.contrib.admin',
 u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.sites',
 u'django.contrib.sessions',
 u'django.contrib.staticfiles',
 u'djblets',
 u'djblets.avatars',
 u'djblets.configforms',
 u'djblets.datagrid',
 u'djblets.extensions',
 u'djblets.features',
 u'djblets.feedview',
 u'djblets.forms',
 u'djblets.gravatars',
 u'djblets.integrations',
 u'djblets.log',
 u'djblets.pipeline',
 u'djblets.privacy',
 u'djblets.recaptcha',
 u'djblets.siteconfig',
 u'djblets.util',
 u'haystack',
 u'oauth2_provider',
 u'pipeline',
 u'reviewboard',
 u'reviewboard.accounts',
 u'reviewboard.admin',
 u'reviewboard.attachments',
 u'reviewboard.avatars',
 u'reviewboard.changedescs',
 u'reviewboard.diffviewer',
 u'reviewboard.extensions',
 u'reviewboard.hostingsvcs',
 u'reviewboard.integrations',
 u'reviewboard.notifications',
 u'reviewboard.oauth',
 u'reviewboard.reviews',
 u'reviewboard.scmtools',
 u'reviewboard.site',
 u'reviewboard.webapi',
 u'django_evolution']
Installed Middleware:
[u'django.middleware.gzip.GZipMiddleware',
 u'reviewboard.admin.middleware.InitReviewBoardMiddleware',
 u'corsheaders.middleware.CorsMiddleware',
 u'django.middleware.clickjacking.XFrameOptionsMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.http.ConditionalGetMiddleware',
 u'django.middleware.locale.LocaleMiddleware',
 u'django.contrib.sessions.middleware.SessionMiddleware',
 u'django.contrib.auth.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware',
 u'djblets.siteconfig.middleware.SettingsMiddleware',
 u'reviewboard.admin.middleware.LoadSettingsMiddleware',
 u'djblets.extensions.middleware.ExtensionsMiddleware',
 u'djblets.integrations.middleware.IntegrationsMiddleware',
 u'djblets.log.middleware.LoggingMiddleware',
 u'reviewboard.accounts.middleware.TimezoneMiddleware',
 u'reviewboard.accounts.middleware.UpdateLastLoginMiddleware',
 u'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware',
 u'reviewboard.accounts.middleware.X509AuthMiddleware',
 u'reviewboard.site.middleware.LocalSiteMiddleware',
 u'djblets.extensions.middleware.ExtensionsMiddlewareRunner',
 u'reviewboard.admin.middleware.ExtraExceptionInfoMiddleware']


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py"
in get_response
  88. response = middleware_method(request)
File
"/usr/local/lib/python2.7/dist-packages/reviewboard/admin/middleware.py" in
process_request
  27. initialize()
File "/usr/local/lib/python2.7/dist-packages/reviewboard/__init__.py" in
initialize
  144. siteconfig = SiteConfiguration.objects.get_current()
File
"/usr/local/lib/python2.7/dist-packages/djblets/siteconfig/managers.py" in
get_current
  42. return self.get_for_site_id(Site.objects.get_current().pk)
File
"/usr/local/lib/python2.7/dist-packages/django/contrib/sites/models.py" in
get_current
  47. current_site = self.get(pk=sid)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py"
in get
  151. return self.get_queryset().get(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in
get
  310. self.model._meta.object_name)

Exception Type: DoesNotExist at /
Exception Value: Site matching query does not exist.

---

The site is meant to run under https and redirect all http requests to
https.

My /etc/apache2/sites-enabled/rebo.example.com looks like below:

---


ServerName rebo.example.com
Redirect "/" "https://rebo.example.com/;



ServerName rebo.example.com
DocumentRoot "/var/www/rebo.example.com/htdocs"

# Error handlers
ErrorDocument 500 /errordocs/500.html

WSGIPassAuthorization On
WSGIScriptAlias "/" 

Re: site migration

2020-07-28 Thread Paul Mansfield
AIUI, it's all in the database.
https://groups.google.com/g/reviewboard/c/KHjIWCU_YJo

well, apart from people's avatars, so I would back up htdocs/media/


On Tue, 28 Jul 2020 at 17:16, Adam Weremczuk  wrote:

> Hi Paul,
>
> Thanks for the hint, I'll bear it in mind.
>
> What I'm after really is a site migration procedure applicable to my
> environment.
>
> If there is no official documentation in place maybe somebody could at
> least provide a list of steps?
>
> Regards,
> Adam
>
>
> On Tue, 28 Jul 2020 at 17:04, Paul Mansfield <
> paul.mansfi...@agileanalog.com> wrote:
>
>> did you restore your SECRET_KEY?
>>
>> check your reviewboard settings_local.py file
>>
>> mine is in /var/www/reviewboard/conf/settings_local.py because that's the
>> directory for my virtual http server
>>
>> in there you'll find this:
>> # Unique secret key. Don't share this with anybody.
>> SECRET_KEY = 'xxx'
>>
>> you need to make a note/copy of that key from your live RB instance, and
>> if you restore it from a backup, put that key into the new instance.
>>
>>
>>
>>
>> On Tue, 28 Jul 2020 at 15:58, Adam Weremczuk 
>> wrote:
>>
>>> Hi all,
>>>
>>> Today I've attempted a migration from:
>>>
>>> Debian 9.3
>>> Apache 2.4.25
>>> MySQL 5.7.30
>>> ReviewBoard 3.0.17
>>>
>>> to:
>>>
>>> Debian 9.13
>>> Apache 2.4.25
>>> MySQL 5.7.31
>>> ReviewBoard 3.0.18
>>>
>>> Rather small differences and I didn't expect much trouble.
>>>
>>> I started with migrating database (mysqldump) which resulted in the
>>> following 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.[Tue Jul 28
>>> 13:05:08.361856 2020] [wsgi:error] [pid 1650:tid 140483573556992] [client
>>> 10.200.20.2:53391 ] ERROR:root:Could not load
>>> siteconfig: Site matching query does not exist.*
>>>
>>> When I dropped the database and restored the original the error didn't
>>> go away which I found really strange. In order to get a fully functional
>>> vanilla RB 3.0.18 back on the destination I had to restore the entire
>>> container from a pre-db-fiddling backup.
>>>
>>> By looking at the content of mysqldump it doesn't look like db
>>> migration should be necessary anyway. The differences between a vanilla and
>>> data populated dump where down to:
>>>
>>> *ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;*
>>>
>>> vs
>>>
>>> *ENGINE=InnoDB DEFAULT CHARSET=utf8;*
>>>
>>> Is it ok to just copy "repository-clones", "data" and "conf" directories
>>> over?
>>>
>>> Is what I'm trying to achieve documented somewhere step by step in
>>> details?
>>>
>>> Please advise.
>>>
>>> Regards,
>>> Adam
>>>
>>> --
>>> Supercharge your Review Board with Power Pack:
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons:
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Review Board Community" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to reviewboard+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/reviewboard/CALC-DAHJf%3DF1nzFF-TwhugqA1Dgj4azZ8F83jLNBofjBZbXFsw%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> P Mansfield, Senior DevOps Engineer, Agile Analog Ltd
>> GPG fingerprint: 8BC9D73EE3D4669C1C138ABD41D5B0C9030D4AE6
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to reviewboard+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/reviewboard/CAMukpcDhwVvxF3kXmFF1VnMbW-ud3DDJmAWkuzyHATXHabnS3Q%40mail.gmail.com
>> 
>> .
>>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To 

Re: site migration

2020-07-28 Thread Adam Weremczuk
Hi Paul,

Thanks for the hint, I'll bear it in mind.

What I'm after really is a site migration procedure applicable to my
environment.

If there is no official documentation in place maybe somebody could at
least provide a list of steps?

Regards,
Adam


On Tue, 28 Jul 2020 at 17:04, Paul Mansfield 
wrote:

> did you restore your SECRET_KEY?
>
> check your reviewboard settings_local.py file
>
> mine is in /var/www/reviewboard/conf/settings_local.py because that's the
> directory for my virtual http server
>
> in there you'll find this:
> # Unique secret key. Don't share this with anybody.
> SECRET_KEY = 'xxx'
>
> you need to make a note/copy of that key from your live RB instance, and
> if you restore it from a backup, put that key into the new instance.
>
>
>
>
> On Tue, 28 Jul 2020 at 15:58, Adam Weremczuk  wrote:
>
>> Hi all,
>>
>> Today I've attempted a migration from:
>>
>> Debian 9.3
>> Apache 2.4.25
>> MySQL 5.7.30
>> ReviewBoard 3.0.17
>>
>> to:
>>
>> Debian 9.13
>> Apache 2.4.25
>> MySQL 5.7.31
>> ReviewBoard 3.0.18
>>
>> Rather small differences and I didn't expect much trouble.
>>
>> I started with migrating database (mysqldump) which resulted in the
>> following 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.[Tue Jul 28 13:05:08.361856
>> 2020] [wsgi:error] [pid 1650:tid 140483573556992] [client 10.200.20.2:53391
>> ] ERROR:root:Could not load siteconfig: Site
>> matching query does not exist.*
>>
>> When I dropped the database and restored the original the error didn't go
>> away which I found really strange. In order to get a fully functional
>> vanilla RB 3.0.18 back on the destination I had to restore the entire
>> container from a pre-db-fiddling backup.
>>
>> By looking at the content of mysqldump it doesn't look like db
>> migration should be necessary anyway. The differences between a vanilla and
>> data populated dump where down to:
>>
>> *ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;*
>>
>> vs
>>
>> *ENGINE=InnoDB DEFAULT CHARSET=utf8;*
>>
>> Is it ok to just copy "repository-clones", "data" and "conf" directories
>> over?
>>
>> Is what I'm trying to achieve documented somewhere step by step in
>> details?
>>
>> Please advise.
>>
>> Regards,
>> Adam
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to reviewboard+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/reviewboard/CALC-DAHJf%3DF1nzFF-TwhugqA1Dgj4azZ8F83jLNBofjBZbXFsw%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> P Mansfield, Senior DevOps Engineer, Agile Analog Ltd
> GPG fingerprint: 8BC9D73EE3D4669C1C138ABD41D5B0C9030D4AE6
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/CAMukpcDhwVvxF3kXmFF1VnMbW-ud3DDJmAWkuzyHATXHabnS3Q%40mail.gmail.com
> 
> .
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CALC-DAHeTAo1A4xRLN65TOojQrcgCn6k%3D%2B5PVpu4jHNHsiJwpg%40mail.gmail.com.


Re: site migration

2020-07-28 Thread Paul Mansfield
did you restore your SECRET_KEY?

check your reviewboard settings_local.py file

mine is in /var/www/reviewboard/conf/settings_local.py because that's the
directory for my virtual http server

in there you'll find this:
# Unique secret key. Don't share this with anybody.
SECRET_KEY = 'xxx'

you need to make a note/copy of that key from your live RB instance, and if
you restore it from a backup, put that key into the new instance.




On Tue, 28 Jul 2020 at 15:58, Adam Weremczuk  wrote:

> Hi all,
>
> Today I've attempted a migration from:
>
> Debian 9.3
> Apache 2.4.25
> MySQL 5.7.30
> ReviewBoard 3.0.17
>
> to:
>
> Debian 9.13
> Apache 2.4.25
> MySQL 5.7.31
> ReviewBoard 3.0.18
>
> Rather small differences and I didn't expect much trouble.
>
> I started with migrating database (mysqldump) which resulted in the
> following 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.[Tue Jul 28 13:05:08.361856
> 2020] [wsgi:error] [pid 1650:tid 140483573556992] [client 10.200.20.2:53391
> ] ERROR:root:Could not load siteconfig: Site
> matching query does not exist.*
>
> When I dropped the database and restored the original the error didn't go
> away which I found really strange. In order to get a fully functional
> vanilla RB 3.0.18 back on the destination I had to restore the entire
> container from a pre-db-fiddling backup.
>
> By looking at the content of mysqldump it doesn't look like db
> migration should be necessary anyway. The differences between a vanilla and
> data populated dump where down to:
>
> *ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;*
>
> vs
>
> *ENGINE=InnoDB DEFAULT CHARSET=utf8;*
>
> Is it ok to just copy "repository-clones", "data" and "conf" directories
> over?
>
> Is what I'm trying to achieve documented somewhere step by step in details?
>
> Please advise.
>
> Regards,
> Adam
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/CALC-DAHJf%3DF1nzFF-TwhugqA1Dgj4azZ8F83jLNBofjBZbXFsw%40mail.gmail.com
> 
> .
>


-- 
P Mansfield, Senior DevOps Engineer, Agile Analog Ltd
GPG fingerprint: 8BC9D73EE3D4669C1C138ABD41D5B0C9030D4AE6

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CAMukpcDhwVvxF3kXmFF1VnMbW-ud3DDJmAWkuzyHATXHabnS3Q%40mail.gmail.com.


Re: Site Migration Issues from 1.5.2 to 1.7.14

2014-03-19 Thread Bhaskar Roy
Hi Kevin,

Can I know how you performed these steps.

5. Upgrade failed with a 1050 (or similar) error because it couldn't access 
some table. So I temporarily overrode django's default database handler to 
use mysql + client configs in my.cnf (only a single site will reside on 
this VM) via django's conf/global_settings.py, I then ran 
'./reviewboard/manage.py syncdb'.
6. syncdb also failed, so I dropped all my tables and re-ran the syncdb.

regards
Bhaskar 

On Friday, 14 March 2014 23:20:27 UTC+5:30, Kevin Phillips wrote:

 All;

 I'm having some issues performing a site migration of RB 1.5.2 to 1.7.14 
 from an EOL server to a VM. Here are the steps I preformed:

 1. Took SQL dump of reviewboard database and restored on new system
 2. Took copy of application web root and copied to new system
 3. Configured memcached on new system.
 3. Installed Reviewboard==1.7.14 Django==1.4.10 python-memcached 
 MySQL-python + deps via easy_install (Python 2.7.3)
 4. Preformed a rb-site upgrade of application web root.
 5. Upgrade failed with a 1050 (or similar) error because it couldn't 
 access some table. So I temporarily overrode django's default database 
 handler to use mysql + client configs in my.cnf (only a single site will 
 reside on this VM) via django's conf/global_settings.py, I then ran 
 './reviewboard/manage.py syncdb'.
 6. syncdb also failed, so I dropped all my tables and re-ran the syncdb.
 7. The second syncdb after dropping my tables worked, then I re-ran the 
 rb-site upgrade
 8. The second rb-site upgrade was successful but prompted me to modify my 
 apache vhost config and validate the site settings.
 9. I actioned the changes and restarted the web server.

 After this I get the error 500 page but I get a mod_python stack trace 
 (yes I know mod_python is simply in there for legacy purposes, but the old 
 site ran it and I cannot figure out how to cut-over to mod_wsgi).

 STACKTRACE:
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] mod_python 
 (pid=2342, interpreter='reviewboard_review_vmem_com', 
 phase='PythonHandler', handler='django.core.handlers.modpython'): 
 Application error, referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] ServerName: 
 'reviewboard.sub.domain', referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] DocumentRoot: 
 '/var/www/review.vmem.com/htdocs', referer: 
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] URI: '/review/', 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Location: 
 '/review/', referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Directory: None, 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Filename: 
 '/var/www/review.vmem.com/htdocs/review', referer: 
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] PathInfo: '/', 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Traceback (most 
 recent call last):, referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File 
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 1537, in 
 HandlerDispatch\ndefault=default_handler, arg=req, 
 silent=hlist.silent), referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File 
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 1202, in 
 _process_target\nmodule = import_module(module_name, path=path), 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File 
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 304, in 
 import_module\nreturn __import__(module_name, {}, {}, ['*']), referer: 
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] ImportError: No 
 module named django.core.handlers.modpython, referer: 
 http://reviewboard.sub.domain/review/

 VHOST CONFIG
 VirtualHost *:80
 ServerName reviewboard.sub.domain
 DocumentRoot /var/www/reviewboard/htdocs

 # Error handlers
 ErrorDocument 500 /errordocs/500.html

 # Serve django pages
 Location /review/
 PythonPath ['/var/www/reviewboard/conf'] + sys.path
 SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
 SetEnv PYTHON_EGG_CACHE /var/www/reviewboard/tmp/egg_cache
 SetHandler mod_python
 PythonHandler django.core.handlers.modpython
 PythonAutoReload Off
 PythonDebug Off
 # Used to run multiple mod_python sites in the same apache
 PythonInterpreter reviewboard_reviewboard
 /Location

 # Serve static without running it through mod_python
 # Required for upgrade from Reviewboard 1.5.2 to 1.7.14
 Location /review/static
 SetHandler None
 /Location

 

Re: Site Migration Issues from 1.5.2 to 1.7.14

2014-03-19 Thread Kevin Phillips
The 1050 error from django was due to changes in to configuration file 
format. Instead of using the format:
DATABASE_ENGINE = '',
DATABASE_NAME='',
.
.
.

The devs changed the format to:
DATABASES = {
 'default' : {
  'ENGINE': 'django.db.backends,mysql',
  'NAME': '',
  'USER': '',
  'PASSWORD': '',
  'HOST': '',
 },
}

The caches format has changed similarly. 
# Cache backend settings.
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'localhost:11211',
},
}

Have you verified the integrity of your dump? If so, you should not have to 
drop your tables just convert them all to InnoDB. If you don't convert your 
tables you will see sql errors when the upgrade script attempts to create 
primary keys in the database.

KP

On Wednesday, March 19, 2014 3:09:29 AM UTC-7, Bhaskar Roy wrote:

 Hi Kevin,

 Can I know how you performed these steps.

 5. Upgrade failed with a 1050 (or similar) error because it couldn't 
 access some table. So I temporarily overrode django's default database 
 handler to use mysql + client configs in my.cnf (only a single site will 
 reside on this VM) via django's conf/global_settings.py, I then ran 
 './reviewboard/manage.py syncdb'.
 6. syncdb also failed, so I dropped all my tables and re-ran the syncdb.

 regards
 Bhaskar 

 On Friday, 14 March 2014 23:20:27 UTC+5:30, Kevin Phillips wrote:

 All;

 I'm having some issues performing a site migration of RB 1.5.2 to 1.7.14 
 from an EOL server to a VM. Here are the steps I preformed:

 1. Took SQL dump of reviewboard database and restored on new system
 2. Took copy of application web root and copied to new system
 3. Configured memcached on new system.
 3. Installed Reviewboard==1.7.14 Django==1.4.10 python-memcached 
 MySQL-python + deps via easy_install (Python 2.7.3)
 4. Preformed a rb-site upgrade of application web root.
 5. Upgrade failed with a 1050 (or similar) error because it couldn't 
 access some table. So I temporarily overrode django's default database 
 handler to use mysql + client configs in my.cnf (only a single site will 
 reside on this VM) via django's conf/global_settings.py, I then ran 
 './reviewboard/manage.py syncdb'.
 6. syncdb also failed, so I dropped all my tables and re-ran the syncdb.
 7. The second syncdb after dropping my tables worked, then I re-ran the 
 rb-site upgrade
 8. The second rb-site upgrade was successful but prompted me to modify my 
 apache vhost config and validate the site settings.
 9. I actioned the changes and restarted the web server.

 After this I get the error 500 page but I get a mod_python stack trace 
 (yes I know mod_python is simply in there for legacy purposes, but the old 
 site ran it and I cannot figure out how to cut-over to mod_wsgi).

 STACKTRACE:
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] mod_python 
 (pid=2342, interpreter='reviewboard_review_vmem_com', 
 phase='PythonHandler', handler='django.core.handlers.modpython'): 
 Application error, referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] ServerName: 
 'reviewboard.sub.domain', referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] DocumentRoot: 
 '/var/www/review.vmem.com/htdocs', referer: 
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] URI: '/review/', 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Location: 
 '/review/', referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Directory: None, 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Filename: 
 '/var/www/review.vmem.com/htdocs/review', referer: 
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] PathInfo: '/', 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Traceback (most 
 recent call last):, referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File 
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 1537, in 
 HandlerDispatch\ndefault=default_handler, arg=req, 
 silent=hlist.silent), referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File 
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 1202, in 
 _process_target\nmodule = import_module(module_name, path=path), 
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File 
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 304, in 
 import_module\nreturn __import__(module_name, {}, {}, ['*']), referer: 
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 

Re: Site Migration Issues from 1.5.2 to 1.7.14

2014-03-15 Thread Kevin Phillips


 Christian;


Good news! Turns out the dump has been truncated by the allowed_packet_size 
for mysqldump (problem with the interface between the seat and keyboard). 
The upgrade succeeded, however I had to alter the engine type of all the 
tables from myisam to innodb.

Can you advise on updating to mod_wsgi? Is there a way to get reviewboard 
to update it for me, just kidding, here is what I have:
reviewboard.wsgi

import os
import sys

os.environ['DJANGO_SETTINGS_MODULE'] = reviewboard.settings
os.environ['PYTHON_EGG_CACHE'] = /var/www/review.company.com/tmp/egg_cache
os.environ['HOME'] = /var/www/review.company.com/data
os.environ['PYTHONPATH'] = '/var/www/review.company.com/conf:' + 
os.environ.get('PYTHONPATH', '')

sys.path = ['/var/www/review.company.com/conf'] + sys.path

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

apache vhost config:
VirtualHost *:80
ServerName review.some.internal.dns.subdomain
DocumentRoot /var/www/review.company.com/htdocs

# Error handlers
ErrorDocument 500 /errordocs/500.html

WSGIPassAuthorization On
WSGIScriptAlias / 
/var/www/review.company.com/htdocs/reviewboard.wsgi/

Directory /var/www/review.company.com/htdocs
AllowOverride All
Options -Indexes +FollowSymLinks
Allow from all
/Directory

# Prevent the server from processing or allowing the rendering of
# certain file types.
Location /media/uploaded
SetHandler None
Options None

AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 
.phps .asp
AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht 
.jsp .sh .rb

IfModule mod_php5.c
php_flag engine off
/IfModule
/Location

# Alias static media requests to filesystem
Alias /media /var/www/review.vmem.com/htdocs/media
Alias /static /var/www/review.vmem.com/htdocs/static
Alias /errordocs /var/www/review.vmem.com/htdocs/errordocs
Alias /favicon.ico 
/var/www/review.vmem.com/htdocs/static/rb/images/favicon.png
/VirtualHost


For posterity's sake, here is my upgrade log,
Rebuilding directory structure
Updating database. This may take a while.

The log output below, including warnings and errors,
can be ignored unless upgrade fails.

-- begin log output --
Creating tables ...
Creating table extensions_registeredextension
Creating table accounts_localsiteprofile
Creating table attachments_fileattachment
Creating table diffviewer_filediffdata
Creating table hostingsvcs_hostingserviceaccount
Creating table reviews_fileattachmentcomment
Creating table site_localsite_users
Creating table site_localsite_admins
Creating table site_localsite
Upgrading Review Board from 1.5.2 to 1.7.14
There are unapplied evolutions for auth.
There are unapplied evolutions for sessions.
There are unapplied evolutions for accounts.
There are unapplied evolutions for attachments.
There are unapplied evolutions for changedescs.
There are unapplied evolutions for diffviewer.
There are unapplied evolutions for hostingsvcs.
There are unapplied evolutions for reviews.
There are unapplied evolutions for scmtools.
Adding baseline version for new models
Evolutions in attachments baseline: file_attachment_orig_filename, 
file_attachment_file_max_length_512
Evolutions in hostingsvcs baseline: account_hosting_url, 
account_hosting_url_max_length_255
Project signature has changed - an evolution is required
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Registering new SCM Tool Plastic SCM 
(reviewboard.scmtools.plastic.PlasticTool) in database
Evolution could not be simulated, possibly due to raw SQL mutations
Evolution successful.
--- end log output ---

Resetting in-database caches.

Upgrade complete!

The location of static media files (CSS, JavaScript, images)
has changed. You will need to make manual changes to
your web server configuration.

For Apache, you will need to add:

Location /review/static
SetHandler None
/Location

Alias /review/static /var/www/review.company.com/htdocs/static

For lighttpd:

alias.url = (
...
/review/static = /var/www/review.company.com/htdocs/static,
...
)

url.rewrite-once = (
...
^(/review/static/.*)$ = $1,
...
)

Once you have made these changes, type the following
to resolve this:

$ rb-site manage /var/www/review.company.com resolve-check static-media
 

-- 
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 

Re: Site Migration Issues from 1.5.2 to 1.7.14

2014-03-14 Thread Christian Hammond
Hi Kevin,

The first red flag is that you had to do anything special with the
database. Working around those issues is going to likely just result in new
issues down the line, so for the moment, let's consider the workarounds as
not a real solution, and dig into what went wrong there.

Can you reproduce the original steps and show me exactly what errors you
hit?

Something important to watch out for is that your database dump is
consistent with regards to the table type (MyISAM vs. InnoDB). If they're
not, you will have problems importing the dump. This is the usual cause of
the problems.

You also need to be sure your database is completely wiped before
importing, so that there aren't any conflicts there.

I don't remember which version of django-evolution we depended on back in
1.7.14, but make sure you have django-evolution 0.6.9 installed before
upgrading the database. (Also, why not run a more modern 1.7.x? Lots of bug
fixes since 1.7.14.)

As far as the last error goes, mod_python is completely unsupported now, by
both us and Django (and, really, the project itself, last I heard). You
should be using mod_wsgi for any installations now.

Christian


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


On Fri, Mar 14, 2014 at 10:50 AM, Kevin Phillips 
kevin.grenville.phill...@gmail.com wrote:

 All;

 I'm having some issues performing a site migration of RB 1.5.2 to 1.7.14
 from an EOL server to a VM. Here are the steps I preformed:

 1. Took SQL dump of reviewboard database and restored on new system
 2. Took copy of application web root and copied to new system
 3. Configured memcached on new system.
 3. Installed Reviewboard==1.7.14 Django==1.4.10 python-memcached
 MySQL-python + deps via easy_install (Python 2.7.3)
 4. Preformed a rb-site upgrade of application web root.
 5. Upgrade failed with a 1050 (or similar) error because it couldn't
 access some table. So I temporarily overrode django's default database
 handler to use mysql + client configs in my.cnf (only a single site will
 reside on this VM) via django's conf/global_settings.py, I then ran
 './reviewboard/manage.py syncdb'.
 6. syncdb also failed, so I dropped all my tables and re-ran the syncdb.
 7. The second syncdb after dropping my tables worked, then I re-ran the
 rb-site upgrade
 8. The second rb-site upgrade was successful but prompted me to modify my
 apache vhost config and validate the site settings.
 9. I actioned the changes and restarted the web server.

 After this I get the error 500 page but I get a mod_python stack trace
 (yes I know mod_python is simply in there for legacy purposes, but the old
 site ran it and I cannot figure out how to cut-over to mod_wsgi).

 STACKTRACE:
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] mod_python
 (pid=2342, interpreter='reviewboard_review_vmem_com',
 phase='PythonHandler', handler='django.core.handlers.modpython'):
 Application error, referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] ServerName:
 'reviewboard.sub.domain', referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] DocumentRoot:
 '/var/www/review.vmem.com/htdocs', referer:
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] URI: '/review/',
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Location:
 '/review/', referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Directory: None,
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Filename:
 '/var/www/review.vmem.com/htdocs/review', referer:
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] PathInfo: '/',
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] Traceback (most
 recent call last):, referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 1537, in
 HandlerDispatch\ndefault=default_handler, arg=req,
 silent=hlist.silent), referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 1202, in
 _process_target\nmodule = import_module(module_name, path=path),
 referer: http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48]   File
 /usr/lib/python2.7/dist-packages/mod_python/importer.py, line 304, in
 import_module\nreturn __import__(module_name, {}, {}, ['*']), referer:
 http://reviewboard.sub.domain/review/
 [Fri Mar 14 09:48:18 2014] [error] [client 10.12.21.48] ImportError: No
 module named 

Re: Site Migration Issues from 1.5.2 to 1.7.14

2014-03-14 Thread Kevin Phillips
Christian;

Thanks for the quick response. I definitely agree that the monkey-patches I 
made are not fit for production (I just really wanted to make it work). As 
it turns out, I didn't even need them. django-evolutions is at 0.6.9 per 
your suggestion. My tables are MYISAM, which I must be converted to InnoDB 
to play well. I feared I might be locked into mod_python, but it sounds 
like I can go with -- and really SHOULD -- mod_wsgi (which I prefer).

Can you clarify what you mean by completely wiping the database? Do you 
mean schema and data or just data?

We have two sites, one 1.5.2 and another that is 1.7.14. We made very heavy 
modifications to post-review for both versions. Given the amount of work to 
re-wrap post-review, I would rather unify the environment and reuse what I 
have already done. It is partially because I don't have time to investigate 
the changes between versions and mitigate any of the associated 
risks/missteps.

 I had figured you would need more detailed information so I ran through 
the migrate this morning. Here is what I have.
1. easy_install Reviewboard==1.7.14 Django==1.4.10 MySQL-python 
python-memcached
2. mysql -u root -p  restore_reviewboard_db.sql (this includes users, but 
given your suggestion to wipe the db I do not restore schema or table rows)
3. scp user@oldhost:/var/www/review.company.com /var/www/
4. sudo rb-site --version (verfiy I am using 1.7.14)
5. sudo scp user@oldhost:/var/www/review.company.com/conf/settings_local.py 
/usr/local/lib/python2.7/dist-packages/Reviewboard-1.7.14-py2.7.egg/reviewboard/
6. if [[ $(grep -q 'evolution-0.6.9 
/usr/local/lib/python2.7/dist-packages/) -eq 0 ]]; then echo 
'django-evolution is present with the correct version'; fi (this echo'd the 
string)
7. sudo rb-site upgrade /var/www/review.company.com (this produced the 
django db ENGINE exception, but I realized this was only due to changes in 
the configuration)
8. !!
This throws:
Traceback (most recent call last):
  File /usr/local/bin/rb-site, line 9, in module
load_entry_point('ReviewBoard==1.7.14', 'console_scripts', 'rb-site')()
  File 
/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.14-py2.7.egg/reviewboard/cmdline/rbsite.py,
 
line 2027, in main
command.run()
  File 
/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.14-py2.7.egg/reviewboard/cmdline/rbsite.py,
 
line 1837, in run
static_media_upgrade_needed = site.get_static_media_upgrade_needed()
  File 
/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.14-py2.7.egg/reviewboard/cmdline/rbsite.py,
 
line 385, in get_static_media_upgrade_needed
siteconfig = SiteConfiguration.objects.get_current()
  File 
/usr/local/lib/python2.7/dist-packages/Djblets-0.7.28-py2.7.egg/djblets/siteconfig/managers.py,
 
line 47, in get_current
site = Site.objects.get_current()
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/contrib/sites/models.py,
 
line 25, in get_current
current_site = self.get(pk=sid)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/manager.py,
 
line 131, in get
return self.get_query_set().get(*args, **kwargs)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py,
 
line 361, in get
num = len(clone)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py,
 
line 85, in __len__
self._result_cache = list(self.iterator())
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py,
 
line 291, in iterator
for row in compiler.results_iter():
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/sql/compiler.py,
 
line 763, in results_iter
for rows in self.execute_sql(MULTI):
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/sql/compiler.py,
 
line 818, in execute_sql
cursor.execute(sql, params)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/backends/util.py,
 
line 40, in execute
return self.cursor.execute(sql, params)
  File 
/usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/backends/mysql/base.py,
 
line 114, in execute
return self.cursor.execute(query, args)
  File 
/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/cursors.py,
 
line 205, in execute
self.errorhandler(self, exc, value)
  File 
/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/connections.py,
 
line 36, in defaulterrorhandler
raise errorclass, errorvalue
django.db.utils.DatabaseError: (1146, Table 'review.django_site' doesn't 
exist)

which makes sense, because I never restored the schema or data.

So do I need to restore the table schemas and drop all row data to proceed? 
If so, is the application able to restore all the old site's 
data/configurations from the application web 

Re: Site Migration Issues from 1.5.2 to 1.7.14

2014-03-14 Thread Christian Hammond
Hi Kevin,

I meant wiping it before doing any imports. Just making sure you're
importing into a fresh, empty database.

The order you'll want is:

1) Create the database (or wipe it if it already exists).
2) Import the SQL dump.
3) Run rb-site upgrade.

Christian

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


On Fri, Mar 14, 2014 at 3:42 PM, Kevin Phillips 
kevin.grenville.phill...@gmail.com wrote:

 Christian;

 Thanks for the quick response. I definitely agree that the monkey-patches
 I made are not fit for production (I just really wanted to make it work).
 As it turns out, I didn't even need them. django-evolutions is at 0.6.9 per
 your suggestion. My tables are MYISAM, which I must be converted to InnoDB
 to play well. I feared I might be locked into mod_python, but it sounds
 like I can go with -- and really SHOULD -- mod_wsgi (which I prefer).

 Can you clarify what you mean by completely wiping the database? Do you
 mean schema and data or just data?

 We have two sites, one 1.5.2 and another that is 1.7.14. We made very
 heavy modifications to post-review for both versions. Given the amount of
 work to re-wrap post-review, I would rather unify the environment and reuse
 what I have already done. It is partially because I don't have time to
 investigate the changes between versions and mitigate any of the associated
 risks/missteps.

  I had figured you would need more detailed information so I ran through
 the migrate this morning. Here is what I have.
 1. easy_install Reviewboard==1.7.14 Django==1.4.10 MySQL-python
 python-memcached
 2. mysql -u root -p  restore_reviewboard_db.sql (this includes users, but
 given your suggestion to wipe the db I do not restore schema or table rows)
 3. scp user@oldhost:/var/www/review.company.com /var/www/
 4. sudo rb-site --version (verfiy I am using 1.7.14)
 5. sudo scp user@oldhost:/var/www/
 review.company.com/conf/settings_local.py/usr/local/lib/python2.7/dist-packages/Reviewboard-1.7.14-py2.7.egg/reviewboard/
 6. if [[ $(grep -q 'evolution-0.6.9
 /usr/local/lib/python2.7/dist-packages/) -eq 0 ]]; then echo
 'django-evolution is present with the correct version'; fi (this echo'd the
 string)
 7. sudo rb-site upgrade /var/www/review.company.com (this produced the
 django db ENGINE exception, but I realized this was only due to changes in
 the configuration)
 8. !!
 This throws:
 Traceback (most recent call last):
   File /usr/local/bin/rb-site, line 9, in module
 load_entry_point('ReviewBoard==1.7.14', 'console_scripts', 'rb-site')()
   File
 /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.14-py2.7.egg/reviewboard/cmdline/rbsite.py,
 line 2027, in main
 command.run()
   File
 /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.14-py2.7.egg/reviewboard/cmdline/rbsite.py,
 line 1837, in run
 static_media_upgrade_needed = site.get_static_media_upgrade_needed()
   File
 /usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.14-py2.7.egg/reviewboard/cmdline/rbsite.py,
 line 385, in get_static_media_upgrade_needed
 siteconfig = SiteConfiguration.objects.get_current()
   File
 /usr/local/lib/python2.7/dist-packages/Djblets-0.7.28-py2.7.egg/djblets/siteconfig/managers.py,
 line 47, in get_current
 site = Site.objects.get_current()
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/contrib/sites/models.py,
 line 25, in get_current
 current_site = self.get(pk=sid)
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/manager.py,
 line 131, in get
 return self.get_query_set().get(*args, **kwargs)
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py,
 line 361, in get
 num = len(clone)
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py,
 line 85, in __len__
 self._result_cache = list(self.iterator())
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/query.py,
 line 291, in iterator
 for row in compiler.results_iter():
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/sql/compiler.py,
 line 763, in results_iter
 for rows in self.execute_sql(MULTI):
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/models/sql/compiler.py,
 line 818, in execute_sql
 cursor.execute(sql, params)
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/backends/util.py,
 line 40, in execute
 return self.cursor.execute(sql, params)
   File
 /usr/local/lib/python2.7/dist-packages/Django-1.4.10-py2.7.egg/django/db/backends/mysql/base.py,
 line 114, in execute
 return self.cursor.execute(query, args)
   File
 /usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/cursors.py,
 line 205, in execute
 self.errorhandler(self, exc,