Migrating Review board site

2010-05-05 Thread WANG Yanchao
Hi, there:
I have a problem: How to migrate a reviewboard site to another reviewboard
site.
*Background:* We have been using reviewboard+sqlite on one server for a long
time(2 years). And recently we have been have performance issues. So we
bought a new server and set up a new instance of reviewboard, we are
planning to use mysql instead of sqlite.
*Versions and OS:* The old one review board
is ReviewBoard-1.0alpha2.dev_20090120-py2.5.egg on debian, and the new one
is ReviewBoard-1.0.7-py2.5.egg/ on redhat
*My question:* is how to move all the users/review groups and review
requests data from the old review board to the new one. Can I use sqlite3 to
dump the database and then import to the new reviewboard database( mysql)

Thanks!
-Yanchao

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

Problem with rb-site upgrade

2010-08-26 Thread WANG Yanchao
I upgrade my reviewboard installation from beta to 1.0.9.
I installed a new 1.0.9 reviewboard and make sure it's working on the new
server. and I copy the old db file to the new db (sqlite)
After installation, it tell me there is some missing column in the db so I
run "rb-site upgrade Path" to upgrade the db scheme.

but I get the following error messages:
There are unapplied evolutions for diffviewer.
There are unapplied evolutions for reviews.
Project signature has changed - an evolution is required
No fixtures found.
/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
PendingDeprecationWarning: inner has been called without providing a
connection argument.
  stacklevel=1)
/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
PendingDeprecationWarning: db_type has been called without providing a
connection argument.
  stacklevel=1)
Evolution could not be simulated, possibly due to raw SQL mutations

Error applying evolution: database disk image is malformed

Could anyone give me some clue how to deal with this?

Thanks!
-Yanchao

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

Re: Problem with rb-site upgrade

2010-08-26 Thread WANG Yanchao
Thank you Christian for such timely help!!!

As you advised, I first checked the django-evolution version
it's django_evolution-0.5-py2.5.egg Is it new enough?
I will now also try to copy the database with the DB closed to see if it
works.
If it works, I will try to import the data from sqlite into mysql.


Thanks!
Yanchao WANG

On Thu, Aug 26, 2010 at 5:53 PM, Christian Hammond wrote:

> Hi,
>
> First of all, can you see what version of django_evolution is installed on
> your system? I want to verify that it's new enough.
>
> You can ignore the warnings about things not being called with a database
> connection. That's just due to not using the new APIs in Django 1.2, but
> it's harmless for Review Board.
>
> Second, that "database disk image is malformed" is coming from sqlite, and
> it indicates that perhaps the database is corrupt or in some bad state. A
> quick Google search shows some people who have hit this (not with Review
> Board) and from what I can tell the database wasn't closed properly due to
> application crashes.
>
> This may be an interesting read:
> http://www.sqlite.org/lockingv3.html#how_to_corrupt
>
> When you copied over the database file, was the Review Board server on that
> system still running? If so, it may be worth shutting down Apache, copying
> over the database, and then starting it back up again.
>
> I would recommend not using sqlite for Review Board. It doesn't handle
> concurrency very well, meaning you can hit locking problems with several
> users using it at once. It's best to use MySQL or PostgreSQL.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
> On Thu, Aug 26, 2010 at 2:42 AM, WANG Yanchao wrote:
>
>> I upgrade my reviewboard installation from beta to 1.0.9.
>> I installed a new 1.0.9 reviewboard and make sure it's working on the new
>> server. and I copy the old db file to the new db (sqlite)
>> After installation, it tell me there is some missing column in the db so I
>> run "rb-site upgrade Path" to upgrade the db scheme.
>>
>> but I get the following error messages:
>> There are unapplied evolutions for diffviewer.
>> There are unapplied evolutions for reviews.
>> Project signature has changed - an evolution is required
>> No fixtures found.
>> /usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
>> PendingDeprecationWarning: inner has been called without providing a
>> connection argument.
>>   stacklevel=1)
>> /usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
>> PendingDeprecationWarning: db_type has been called without providing a
>> connection argument.
>>   stacklevel=1)
>> Evolution could not be simulated, possibly due to raw SQL mutations
>>
>> Error applying evolution: database disk image is malformed
>>
>> Could anyone give me some clue how to deal with this?
>>
>> Thanks!
>> -Yanchao
>>
>> --
>> 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
>
>
>  --
> 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

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

Re: Problem with rb-site upgrade

2010-08-29 Thread WANG Yanchao
lse, `auth_require_sitewide_login`:
true, `site_upload_max_memory_size`: 2621440, `locale_default_charset`:
`utf-8`, `auth_ad_domain_name`: ``, `auth_ad_recursion_depth`: null,
`mail_host`: `smtp.ops.aliyun-inc.com`, `diffviewer_include_space_patterns`:
[``], `mail_default_from`: `webmas...@localhost`, `site_media_url`:
`/ReviewBoard/media/`, `site_admin_name`: `feng.cao`, `auth_ad_group_name`:
``}

*


Thanks!
Yanchao WANG


On Fri, Aug 27, 2010 at 10:32 AM, WANG Yanchao wrote:

> Thank you Christian for such timely help!!!
>
> As you advised, I first checked the django-evolution version
> it's django_evolution-0.5-py2.5.egg Is it new enough?
> I will now also try to copy the database with the DB closed to see if it
> works.
> If it works, I will try to import the data from sqlite into mysql.
>
>
> Thanks!
> Yanchao WANG
>
> On Thu, Aug 26, 2010 at 5:53 PM, Christian Hammond wrote:
>
>> Hi,
>>
>> First of all, can you see what version of django_evolution is installed on
>> your system? I want to verify that it's new enough.
>>
>> You can ignore the warnings about things not being called with a database
>> connection. That's just due to not using the new APIs in Django 1.2, but
>> it's harmless for Review Board.
>>
>> Second, that "database disk image is malformed" is coming from sqlite, and
>> it indicates that perhaps the database is corrupt or in some bad state. A
>> quick Google search shows some people who have hit this (not with Review
>> Board) and from what I can tell the database wasn't closed properly due to
>> application crashes.
>>
>> This may be an interesting read:
>> http://www.sqlite.org/lockingv3.html#how_to_corrupt
>>
>> When you copied over the database file, was the Review Board server on
>> that system still running? If so, it may be worth shutting down Apache,
>> copying over the database, and then starting it back up again.
>>
>> I would recommend not using sqlite for Review Board. It doesn't handle
>> concurrency very well, meaning you can hit locking problems with several
>> users using it at once. It's best to use MySQL or PostgreSQL.
>>
>> Christian
>>
>> --
>> Christian Hammond - chip...@chipx86.com
>> Review Board - http://www.reviewboard.org
>> VMware, Inc. - http://www.vmware.com
>>
>>
>> On Thu, Aug 26, 2010 at 2:42 AM, WANG Yanchao wrote:
>>
>>> I upgrade my reviewboard installation from beta to 1.0.9.
>>> I installed a new 1.0.9 reviewboard and make sure it's working on the new
>>> server. and I copy the old db file to the new db (sqlite)
>>> After installation, it tell me there is some missing column in the db so
>>> I run "rb-site upgrade Path" to upgrade the db scheme.
>>>
>>> but I get the following error messages:
>>> There are unapplied evolutions for diffviewer.
>>> There are unapplied evolutions for reviews.
>>> Project signature has changed - an evolution is required
>>> No fixtures found.
>>> /usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
>>> PendingDeprecationWarning: inner has been called without providing a
>>> connection argument.
>>>   stacklevel=1)
>>> /usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
>>> PendingDeprecationWarning: db_type has been called without providing a
>>> connection argument.
>>>   stacklevel=1)
>>> Evolution could not be simulated, possibly due to raw SQL mutations
>>>
>>> Error applying evolution: database disk image is malformed
>>>
>>> Could anyone give me some clue how to deal with this?
>>>
>>> Thanks!
>>> -Yanchao
>>>
>>> --
>>> 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
>>
>>
>>  --
>> 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
>
>
>

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

Re: Problem with rb-site upgrade

2010-08-30 Thread WANG Yanchao
Hi, the second step, siteconfig = SiteConfiguration.objects.get() it gives
the following error:

*Traceback (most recent call last):*
*  File "", line 1, in *
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/manager.py",
line 132, in get*
*return self.get_query_set().get(*args, **kwargs)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 336, in get*
*num = len(clone)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 81, in __len__*
*self._result_cache = list(self.iterator())*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 282, in iterator*
*obj = self.model(*row[index_start:aggregate_start])*
*  File
"/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/siteconfig/models.py",
line 52, in __init__*
*models.Model.__init__(self, *args, **kwargs)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/base.py",
line 341, in __init__*
*signals.post_init.send(sender=self.__class__, instance=self)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/dispatch/dispatcher.py",
line 162, in send*
*response = receiver(signal=self, sender=sender, **named)*
*  File
"/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/util/fields.py",
line 174, in post_init*
*value = self.loads(value)*
*  File
"/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/util/fields.py",
line 207, in loads*
*val = eval(val)*
*  File "", line 1*
*{`mail_host_password`: ``, `cache_backend`:
`file:///tmp/reviewboard_cache`, `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`: ``, `mail_server_address`: `r...@localhost`,
`auth_ldap_uri`: ``, `auth_ldap_anon_bind_uid`: ``,
`diffviewer_context_num_lines`: 5, `diffviewer_paginate_orphans`: 10,
`mail_send_review_mail`: true, `diffviewer_syntax_highlighting_threshold`:
0, `site_media_root`: `/var/www/ReviewBoard/htdocs/media`,
`locale_language_code`: `en-us`, `auth_nis_email_domain`: ``,
`logging_allow_profiling`: false, `auth_ldap_anon_bind_passwd`: ``,
`cache_expiration_time`: 2592000, `site_prepend_www`: false,
`locale_time_zone`: `US/Pacific`, `search_index_file`: ``,
`auth_ldap_base_dn`: ``, `mail_port`: 25, `logging_directory`: null,
`search_enable`: false, `locale_time_format`: `P`, `locale_date_format`: `N
j, Y`, `auth_ldap_email_domain`: ``, `locale_month_day_format`: `F j`,
`auth_ldap_email_attribute`: ``, `auth_custom_backends`: [``],
`diffviewer_syntax_highlighting`: true, `auth_ad_ou_name`: ``,
`auth_ad_find_dc_from_dns`: false, `site_admin_email`: `
feng@alibaba-inc.com`, `auth_backend`: `builtin`, `locale_timezone`:
`US/Pacific`, `auth_ad_domain_controller`: ``, `site_domain_method`: `http`,
`mail_use_tls`: false, `diffviewer_paginate_by`: 20, `logging_enabled`:
false, `diffviewer_show_trailing_whitespace`: false,
`auth_require_sitewide_login`: true, `site_upload_max_memory_size`: 2621440,
`locale_default_charset`: `utf-8`, `auth_ad_domain_name`: ``,
`auth_ad_recursion_depth`: null, `mail_host`: `smtp.ops.aliyun-inc.com`,
`diffviewer_include_space_patterns`: [``], `mail_default_from`:
`webmas...@localhost`, `site_media_url`: `/ReviewBoard/media/`,
`site_admin_name`: `feng.cao`, `auth_ad_group_name`: ``}*
* ^*
*SyntaxError: invalid syntax*




Thanks!
Yanchao WANG


On Mon, Aug 30, 2010 at 3:18 PM, Christian Hammond wrote:

> That's likely due to migrating the database to MySQL. The settings
> information stored in the database wasn't preserved in a proper JSON format.
>
> Can you do the following:
>
> $ rb-site manage /path/to/site shell
> >>> from djblets.siteconfig.models import SiteConfiguration
> >>> siteconfig = SiteConfiguration.objects.get()
> >>> print siteconfig.settings
>
> It should print out the string contents of your settings. You basically
> need to turn this back into a Python dictionary. You can try:
>
> >>> siteconfig.settings = 
> >>> siteconfig.save()
>
> It may work, but it depends on what's going wrong with the settings. If it
> gives any sort of error, please paste exactly what was shown in both the
> printed output and the backtrace.
>
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
> On Sun, Aug 29, 2010 at 11:48 PM, WANG Yanchao wrote:
>
>> Indeed the database malf