1506: Get "Unable to read settings_local.py." error while running rb-site upgrade
- NotABug
- Review Board
locomo******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
Feb. 24, 2010 |
We've been using reviewboard 0.4-pre and would like to upgrade to latest 1.0.5.1. I follow http://www.reviewboard.org/docs/manual/dev/admin/installation/upgrading/ to upgrade. I get the following error while "rb-site upgrade": Rebuilding directory structure Updating database. This may take a while. Unable to read settings_local.py. Please see http://www.reviewboard.org/docs/manual/dev/admin/ for help setting up Review Board. What version are you running? 0.4-pre What's the URL of the page containing the problem? N/A. Everything is done on a shell. What steps will reproduce the problem? 1. easy_install -U ReviewBoard 2. rb-site upgrade [the_path_to_site] What is the expected output? What do you see instead? I expect the following should be accomplished by rb-site (as per http://www.reviewboard.org/docs/manual/dev/admin/sites/upgrading-sites/#upgradingsites): * Performs database updates and migrations * Rebuilds missing parts of the directory structure * Updates the local copies or links to the Review Board media files What operating system are you using? What browser? Red Hat Enterprise Linux ES release 4 (Nahant Update 5). Browser is not relevant here. Notes: 0.4-pre might be a bit outdated and upgrading from this version might not be as straightforward as the upgrade link suggests. The bigger question I have is whether it is still possible to follow the http://www.reviewboard.org/docs/manual/dev/admin/installation/upgrading/ link to upgrade? Or do I need to do a clean installation? If I have to proceed with clean installation, is there any way I can preserve and migrate the old reviews to 1.0.5.1? Please let me know and I'd be glad to help debug reviewboard.
Your install is too old. You'll need to create a new site. You should be able to reference your old database and migrate things over, but it depends on just how old that release is. We had the label of "0.4" for a long time. It may be worth checking if you have a reviews/evolutions/ or diffviewer/evolutions/ directory in your Review Board tree somewhere. If so, then it should be fine. Otherwise migration may be difficult or impossible. So, first of all, back up your database. Then follow the manual's instructions on creating a new site and specify your old database information. Once everything is done, run the rb-site upgrade command on the site. With luck, it will work fine. If it doesn't, please show all the error messages so we can debug this. Also, please make a note of the timestamp of your current installed copy so we can get an idea of how old it is.
-
+ NeedInfo -
- Type-Defect + Type-Support
Thanks for your help. Let me give you the info you need first before I try anything... Yes, on our installed copy of reviewboard, I see diffviewer/evolutions/ directory, and the timestamp is Aug 20 2008.
That should be new enough to migrate properly. Anything prior to evolutions (which is a few years old now) would be more difficult. Let me know if it works and I'll close this out.
Thanks. I didn't use the upgrade option with rb-site. I just fresh install the new reviewboard and hook it up to the old DB via settings_local.py and it works. I moved onto set the authentication setting to use NIS with domain name and it also works. Just curious, where is the authentication setting information stored now? On the 0.4-pre version, there was some change in settings_local.py to set BUILTIN_AUTH to False and a AUTHENTICATION_BACKENDS list is specified. I cannot find similar stuff in this newly installed copy. Is it stored in DB (if so which table)? Also the newly installed copy does not have many files compared to 0.4-pre, and it looks like it references (symlink) back to the egg directory in the /usr/lib/python2.5/site-packages/. Is this normal? I actually prefer reviewboard to have its own copy files instead of having symlinks back to a lib. Yes, since I can fresh install it. Please close the bug.
The auth information is now stored in the siteconfig_siteconfiguration, which is basically a big json string with all the settings in it.
-
- NeedInfo + NotABug
You can modify the auth info in Settings in the admin UI. The directory created by rb-site is meant to be small. It just references the package. This way you can have multiple sites installed on a server and they'll be fairly light-weight. You may still want to run upgrade, as some fields have changed and I don't believe rb-site install will fix that for you. But maybe.