Reviewboard upgrade problem 1.7 to 3.0.14

47 views
Skip to first unread message

Ron A

unread,
Jun 11, 2019, 5:07:45 PM6/11/19
to Review Board Community
Hi, Posted this in the wrong group so am reposting to the Review Board Community, thanks!
 
On linux I have reviewboard 1.7 and an upgrading to 3.0.14 on a second server.  3.0.14 was working fine on the second server but just with a base install and an empty database created by the inital reviewboard installation. I did a mysqldump of the data from 1.7 and then imported the data to reviewboard 3.0.14. Upon accessing the 3.0.14 url I am prompted to run the  rb-site upgrade <dirname> tool.

During the upgrade I get this error below.  What steps should I take next to resolve the error? Thanks!
Applying database evolutions for auth...
Applying database evolutions for contenttypes...
Applying database evolutions for accounts...
Database evolutions for accounts failed!
The SQL statement was: ALTER TABLE `accounts_profile` CHANGE COLUMN `show_submitted` `show_closed` bool NOT NULL;
The database error was: (1054, "Unknown column 'show_submitted' in 'accounts_profile'")
CommandError: Error applying evolution for accounts: (1054, "Unknown column 'show_submitted' in 'accounts_profile'")

Christian Hammond

unread,
Jun 12, 2019, 12:26:18 AM6/12/19
to revie...@googlegroups.com
Hi Ron,

This looks to me like there's state recorded that says some parts of the upgrade (perhaps to an earlier release, like a 2.0.x/2.5.x) was attempted, but that it never completed successfully, and it's now trying to resume from that bad state. Do you know anything about any attempted upgrades from the past?

You might want to try completely dropping the new database and then importing the mysql one without letting Review Board create or populate the database at all, to make absolutely sure that you're not introducing some bad state there. Once you've imported, please run:

    rb-site manage /path/to/sitedir list-evolutions

And show me the results. I can get a sense of whether my hunch is correct.

We do offer database repair services as part of a support contract, or as a one-off job (billed per-hour). If the state's all wrong (and particularly if the database schema itself is in some half-upgraded state), then it requires a bit of work to undo. We're good at this, though, and can untangle this pretty fast. We can talk more about this in private, if you're interested.

Christian

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/b6d41dc9-915b-4c4d-895a-9090c62c1383%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Ron T

unread,
Jun 12, 2019, 6:19:17 PM6/12/19
to revie...@googlegroups.com
Hi Christian,
Yes I first attempted to upgrade to 3.x but it failed with:
The database error was: (1050, "Table 'reviews_reviewrequest_file_attachment_histories' already exists")
So I dropped the table and ran the upgrade again.
Then it  failed with the column issue below.
I dropped the database to start fresh.
Then I installed reviewboard 2.x, thinking it was a problem with the versions being so far apart.
I ran the rb-site install sitename and things looked normal.
I then did a mysql import of the .sql data and got prompted to run the upgrade command.  That ended up failing in the same way.

This last time after receiving your email I first dropped the database and did a mysql import.
Then I installed reviewboard 3.0 again using pip install ReviewBoard==3.0.15
I did not run rb-site install sitename this time.
Then I got a prompt to upgrade the site so I upgraded the whole directory and there were no errors! yay!
But the site looked odd with not all images resolving correctly. Looking at the web source many links were pointing to an incorrect path.

The site information in reviewboard-home2/conf/apache-wsgi.conf didn't match the information in the database that was imported so I had to do a manual string replace in mysql siteconfig_siteconfiguration.settings to update the database to the new reviewboard-home2 and reviewboard2 data.

UPDATE siteconfig_siteconfiguration set settings = replace(settings, 'reviewboard-home','reviewboard-home2');
UPDATE siteconfig_siteconfiguration set settings = replace(settings, 'reviewboard/static','reviewboard2/static');
UPDATE siteconfig_siteconfiguration set settings = replace(settings, 'reviewboard/media','reviewboard2/media');

Now it comes up fine.
Thanks for your help!

You received this message because you are subscribed to a topic in the Google Groups "Review Board Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reviewboard/lbLBZb4YD8k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/CAE7Vndn7sQpVNYaGz95PbzonhxS2Vy4yOS4QJ%2BKCCQBmSJ9NDg%40mail.gmail.com.

Christian Hammond

unread,
Jun 13, 2019, 1:40:58 AM6/13/19
to revie...@googlegroups.com
Glad it's working now!

Christian


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages